TR标签需要从Table Collection中消除多个类

时间:2013-11-28 13:12:54

标签: javascript jquery jquery-selectors

我的表中有一个Table Row(TR)标记的集合。以下是

的样本
<table screen="SpecialInstruction">
<tr class="Header"><td></td></tr>
<tr class="Normal"><td></td></tr>
<tr class="Footer"><td></td></tr>
<tr class="Total"><td></td></tr>
</table>

现在我想从我的TableRow ollection中过滤掉(Header,Footer&amp; Total)。目前我已经使用了这个代码$('table[screen=SpecialInstruction] tr[class!=Header],是的,它过滤了Header类,但是我想要消除Footer&amp;总课程也是如此。我怎么能做到这一点?

2 个答案:

答案 0 :(得分:1)

尝试:

$('table[screen=SpecialInstruction]:not(tr.Header,tr.Footer,tr.total)')

答案 1 :(得分:1)

您可以使用:

$('table[screen=SpecialInstruction] tr:not(.Header, .Footer, .Total)')