You are here: Reference > JavaScript > client-side > HTML DOM > methods > deleteTFoot (table)

deleteTFoot method (table)

Browser support:
Removes the tfoot element from the current table.
If no tfoot exists on the current table, the deleteTFoot method has no effect.
To create a new footer for a table, use the createTFoot method.


object.deleteTFoot ( );
You can find the related objects in the Supported by objects section below.

Return value:

This method has no return value.

Example HTML code 1:

This example illustrates the use of the createTFoot and deleteTFoot methods:
    <script type="text/javascript">
        function CreateFooter () {
            var table = document.getElementById ("myTable");
            if (!table.tFoot) {
                var footer = table.createTFoot ();
                var row = footer.insertRow (0);
                var cell = row.insertCell (0);
                cell.innerHTML = "<b>Footer for the table.</b>";
        function RemoveFooter () {
            var table = document.getElementById ("myTable");
            table.deleteTFoot ();
    <table id="myTable" border="1px">
                <td>This text is inside the table.</td>
    <br /><br />
    <button onclick="CreateFooter ();">Create a footer for the table!</button>
    <button onclick="RemoveFooter ();">Remove the footer from the table!</button>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content