我是 jquery 的新手,我想计算表中的现有元素,html 结构如下:
<table summary="">
<tr>
<td>
<table id="myid" some more attributes> <-- i got that id and
<tbody>
<tr>foo</tr> <---counting
<tr>bar</tr> <---counting
</tbody>
</table>
</td>
</tr>
</table>
HTML is apex gernerated.
我已经尝试过来自jQuery 的 jquery 语句:count of rows in a table an mores sats 但对我没有任何作用。我不工作的“解决方案”是
$("table[id='myid'] > tbody >tr").length
或者
$('table#myid >tbody:last >tr').length
我很感谢任何提示和提示
马里奥