Я хочу удалить все строки моей таблицы, кроме заголовка.
Вот что я пробовал, но он всегда удаляет все строки и заголовок:
$("#<%=tblDetailFourn.ClientID%> tbody tr").remove();
$("#<%=tblDetailFourn.ClientID%> tbody tr").not("thead tr").remove();
$("#<%=tblDetailFourn.ClientID%> tr").not("thead tr").remove();
$("#<%=tblDetailFourn.ClientID%> tbody").not("thead").remove();
$("#<%=tblDetailFourn.ClientID%> tbody").remove();
$("#<%=tblDetailFourn.ClientID%> > tbody").remove();
Вот html:
<table id="tblDetailFourn" runat="server" class="ProjetTable ProjetTableHover">
<thead>
<tr>
<th style="width:200px">Rôle de Ressource</th>
<th style="width:200px">Nom Prénom</th>
<th style="width:120px">Tel</th>
<th style="width:200px">Courriel</th>
<th style="width:80px">Actif</th>
<th style="width:33px"></th>
<th style="width:33px"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>