如何在html表中选择行,除了使用
jquery的表头行?
@H_404_2@<table id="mytable">
<thead>
<tr>
<th>
Foo
</th>
<td>
Lorem
</td>
<td>
Ipsum
</td>
</tr>
</thead>
<tr>
<th>
Bar
</th>
<td>
Dolor
</td>
<td>
Sit
</td>
</tr>
<tr>
<th>
Baz
</th>
<td>
Amet
</td>
<td>
Consectetuer
</td>
</tr>
</table>
解决方法
@H_404_2@$('tr').not('thead tr').addClass('selected')