You are here: Reference > JavaScript > client-side > HTML DOM > properties > tFoot (table)

tFoot property (table)

Browser support:
Returns a reference to the tfoot element of the table.
The tfoot element is used to create a footer for tables.

Syntax:

object.tFoot;
You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Returns the tfoot object that belongs to the table or null if it is not defined.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the tFoot property:
<head>
    <script type="text/javascript">
        function GetTFoot () {
            var tableFoot = document.getElementById ("myTable").tFoot;
            alert (tableFoot.innerHTML);
        }
    </script>
</head>
<body>
    <button onclick="GetTFoot ();">Get the innerHTML of the TFoot!</button>
    <table id="myTable" border="1px">
        <tbody>
            <tr>
                <td>First row.</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td>The contents of the TFoot element</td>
            </tr>
        </tfoot>
    </table>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content