THE WORLD'S LARGEST WEB DEVELOPER SITE

Table deleteTFoot() Method

Table Object Reference Table Object

Example

Remove a <tfoot> element from a table:

document.getElementById("myTable").deleteTFoot();

Try it yourself »

Definition and Usage

The deleteTFoot() method removes the <tfoot> element (and its content) from the table.

Tip: To create a new <tfoot> element for a table, use the createTFoot() method.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The deleteTFoot() method is supported in all major browsers.


Syntax

tableObject.deleteTFoot()

Parameters

None

Technical Details

Return Value: No return value

More Examples

Example

Create and delete a <tfoot> element:

function myCreateFunction() {
    var table = document.getElementById("myTable");
    var footer = table.createTFoot();
    var row = footer.insertRow(0);
    var cell = row.insertCell(0);
    cell.innerHTML = "<b>This is a table footer</b>";
}

function myDeleteFunction() {
    document.getElementById("myTable").deleteTFoot();
}

Try it yourself »

Related Pages

HTML reference: HTML <tfoot> tag


Table Object Reference Table Object

COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: