J’ai un tableau HTML avec un header et un footer:
<table id="testTable">
<thead>
<tr>
<th>My Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lorem Ipsum</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>My footer</td>
</tr>
<tfoot>
</table>
J’essaie d’ajouter une ligne dans tbody avec le code suivant:
testTable.insertRow(testTable.rows.length - 1);
mais la ligne est ajoutée dans la section tfoot.
Comment puis-je insérer la ligne dans tbody?