tFootプロパティ

プロパティtFootは、テーブルの tfoot への参照を保持します。

構文

javascriptテーブル.tFoot;

例

テーブルのフッターを赤色で塗りつぶします:

html<table id="table">
  <thead>
    <tr>
      <th>header1</th>
      <th>header2</th>
      <th>header3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>value</td>
      <td>value</td>
      <td>value</td>
    </tr>
    <tr>
      <td>value</td>
      <td>value</td>
      <td>value</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td>合計</td>
      <td>合計</td>
      <td>合計</td>
    </tr>
  </tfoot>
</table>
javascriptlet table = document.querySelector('#table');
table.tFoot.style.color = 'red';

関連項目

  • プロパティtHead、
    テーブルのtheadを格納
  • プロパティtBodies、
    テーブルのtbodyを格納
  • プロパティrows、
    テーブルの行を格納
  • プロパティcells、
    テーブルのセルを格納