ヘッダーとフッターを含む HTML テーブルがあります。
<table id="myTable">
<thead>
<tr>
<th>My Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>aaaaa</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>My footer</td>
</tr>
<tfoot>
</table>
次の行を追加しようとしtbody
ています。
myTable.insertRow(myTable.rows.length - 1);
しかし、行はtfoot
セクションに追加されます。
を挿入するにはどうすればよいtbody
ですか?