所以我的HTML表看起來像這樣:使用javascript刪除列的正則表達式?
<table class="mon_list" id="mon_list">
<tr class='list'>
<th class="list" align="center"><b>Klasse(n)</b></th>
<th class="list" align="center">Stunde</th>
<th class="list" align="center">Fach</th>
<th class="list" align="center">Raum</th>
<th class="list" align="center">Vertretungs-Text</th>
<th class="list" align="center">Vertr-Text-2</th>
</tr>
<tr class='list odd'>
<td class="list" align="center" style="background-color: #FFFFFF"><b>6.1</b></td>
<td class="list" align="center" style="background-color: #FFFFFF">1 - 2</td>
<td class="list" align="center" style="background-color: #FFFFFF">Ku</td>
<td class="list" align="center" style="background-color: #FFFFFF">
<s>312</s>006</td>
<td class="list" align="center"> </td>
<td class="list" align="center"> </td>
</tr>
...
</table>
,我需要刪除的最後一列。我無法找到正則表達式。我需要刪除每行中的第6個元素。
? –
不,我不是。我應該使用jQuery嗎?我不是那麼想.. –
你不需要使用jQuery,只是有些人更喜歡使用jQuery,因爲它簡化了一些操作。無論如何,我認爲菲利普的答案可能會解決您的問題。 –