Proprietà tFoot

La proprietà tFoot memorizza un riferimento al tfoot della tabella.

Sintassi

javascripttabella.tFoot;

Esempio

Coloriamo in rosso il footer della tabella:

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

Vedi anche

  • la proprietà tHead,
    che contiene il thead della tabella
  • la proprietà tBodies,
    che contiene il tbody della tabella
  • la proprietà rows,
    che contiene le righe della tabella
  • la proprietà cells,
    che contiene le celle della tabella