2013-11-28 40 views
-1

我的表中有表格行(TR)標記的集合。下面是該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過濾掉(頁眉,頁腳&合計)的樣品。目前我已經使用這個代碼$('table[screen=SpecialInstruction] tr[class!=Header]和是它的過濾標題類,但我想要消除頁腳&總類以及。我怎麼能做到這一點?

+1

你可以鏈屬性選擇:'TR [!級=頭] [!CLASS =頁腳] [!類=總]' –

+1

爲什麼不只是尋找「正常」的班級? – Alvaro

回答

1

您可以使用:

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

他正試圖刪除它們。他只是想要「正常」的一個。 – Alvaro

+0

@Alvaro - 啊,那就對了!糾正。 – techfoobar

1

嘗試:

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