Home >Web Front-end >HTML Tutorial >循环遍历_html/css_WEB-ITnose

循环遍历_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-21 08:55:301232browse

页面有很多Table,怎么利用jQuery选择器,找到除了前两个table的所有table,并且遍历出其中所有table的第二个td 的值a,求出所有a 的和。


回复讨论(解决方案)

eval($('table:not(:first):not(:first)').map(function(){return parseFloat($('td:eq(1)',this).text())}).get().join('+'))

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn