1
<table id="experiences" cellpadding="0" border="1" width="100%">
    <caption>table name</caption>
    <tr><th>col1</th><th>col2</th><th>col3</th><th>col4</th><th>col5</th><th>col6</th></tr>
    <tr><td>something</td><td>something</td><td>something</td><td>something</td><td>something</td><td>something</td></tr>
    <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
    <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
    <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
</table>

Like the above,the target row should be the third row from the top.

BTW, I'm not familiar with jQuery, $().eq(0) selects the first one, how to exclude the first one?

Will $().ne(0) work?

4

2 回答 2

1

这应该这样做:

function not_just_nbsp() {
    return $(this).html() !== "#nbsp;";
}

$("#experiences td").filter(not_just_nbsp).filter(":first").parent();

只需将 nbsp 中的 # 替换为 & 符号即可。必须这样做才能使其显示在 StackOverflow 上。

于 2009-08-27T06:45:06.030 回答
0

要选择大于第一行的所有行,您可以执行以下操作:

$('#experiences td:gt(0)')
于 2009-08-27T07:17:04.127 回答