小编Jah*_*gir的帖子

我可以计算表格的行"$("this tbody tr").长度?

我有3个具有相同类名的表table-sort.我想访问那些表.each()并计算tr内部tbody.

$("this tbody tr").length吗?

$('.table-sort').each(function(index) {
   var rowCount = $("this tbody tr").length; //not work , Could you please correct this?

   var rowCount1 = $(this).find('tbody > tr').length; //this is working fine
   alert(rowCount + '-' + rowCount1);
})
Run Code Online (Sandbox Code Playgroud)

each jquery this

7
推荐指数
1
解决办法
7696
查看次数

标签 统计

each ×1

jquery ×1

this ×1