如何选择除第一个TD之外的所有表格?我不知道有多少列有可能在该表中,所以我真的不能使用:第n个孩子(2)等等选择表格单元格w/jQuery
<table>
<tr>
<td>do not select</td>
<td>select</td>
<td>select</td>
<td>select</td>
...
</tr>
</table>
如何选择除第一个TD之外的所有表格?我不知道有多少列有可能在该表中,所以我真的不能使用:第n个孩子(2)等等选择表格单元格w/jQuery
<table>
<tr>
<td>do not select</td>
<td>select</td>
<td>select</td>
<td>select</td>
...
</tr>
</table>
$allTableCellsButFirst = $('table tr td').not('tr:first-child td:first-child');
应该为你做的伎俩。
你可以一个类添加到您的TD的:
$('#someTable .tableCell').each(function()
{
alert($(this).html());
});
$('table tr td:first-child').siblings();
你是什么意思'选择all'? – Neal
重复?即使阅读后,我不这么认为...... – santa
不完全重复@Marek。相似,是的,重复?没有:) –