HTMLTableElement: deleteTFoot() method
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("HTML DOM")}}
The **deleteTFoot()** method of the {{domxref("HTMLTableElement")}} interface removes the first {{HTMLElement("tfoot")}} element child from a given {{HTMLElement("table")}}, if any.
Syntax
js-nolint
deleteTFoot()Parameters
None.
Return value
None ({{jsxref("undefined")}}).
Examples
This example uses JavaScript to delete a table's footer.
HTML
html
<table>
<thead>
<tr>
<th>Name</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bob</td>
<td>541</td>
</tr>
<tr>
<td>Jim</td>
<td>225</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Average</th>
<td>383</td>
</tr>
</tfoot>
</table>JavaScript
js
const table = document.querySelector("table");
table.deleteTFoot();Result
{{EmbedLiveSample("Examples")}}
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("HTMLTableElement.createTFoot()")}}
- {{domxref("HTMLTableElement.deleteCaption()")}}
- {{domxref("HTMLTableElement.deleteTHead()")}}