https://www.cnblogs.com/Joetao/articles/3583710.html
<div id="dvABC"><br>
<table class="l_height_30 gridcontent" width="100%" border="0" cellspacing="0" cellpadding="0"><br>
<thead><br>
<tr><br>
<td width="50" class="bg_thead center">序号</td><br>
<td class="bg_thead pl_10">内容</td><br>
</tr><br>
</thead><br>
<tbody><br>
<tr><br>
<td width="50" class="bg_thead center">1</td><br>
<td class="bg_thead pl_10">aaaaa</td><br>
</tr><br>
<tr><br>
<td width="50" class="bg_thead center">2</td><br>
<td class="bg_thead pl_10">bbbbb</td><br>
</tr><br>
<tr><br>
<td width="50" class="bg_thead center">3</td><br>
<td class="bg_thead pl_10">ccccc</td><br>
</tr><br>
</tbody><br>
</table><br>
</div>
<br>
$("#dvABC tr").each( function(){ <br>
alert( $(this).text() )<br>
} )<br>
<br>
var tr = $("#dvABC table tr");<br>
$("#dvABC table tr").each(function() {<br>
// tr循环<br>
// 如果要TD循环,可以像下面这样写<br>
$(this).find("td").each(function() {<br>
// td逻辑<br>
});<br>
// 如果想获取某一个td的,可以这样写<br>
var td = $(this).find("td:eq(" + tdIdx + ")");<br>
// 例如获取第一个单元格$(this).find("td:eq(0)");<br>
});<br>转自<a href="http://www.myexception.cn/javascript/1437349.html">http://www.myexception.cn/javascript/1437349.html</a>