table要素にあるtfoot要素を取得

table要素にあるtfoot要素を取得するには、tableElement.tFootプロパティを使用します。

構文

var tfootElement = tableElement.tFoot;

戻り値

tfoot要素を返します。

サンプルコード

JavaScript

// table要素を取得
var tableElem = document.getElementById('sample-table');

var tfootElem = tableElem.tFoot;

alert(tfootElem.outerHTML);

JavaScript逆引きリファレンス一覧へ戻る