Propiedad tFoot

La propiedad tFoot almacena una referencia al tfoot de la tabla.

Sintaxis

javascripttabla.tFoot;

Ejemplo

Coloreemos en rojo el pie de tabla:

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

Ver también

  • propiedad tHead,
    que contiene el thead de la tabla
  • propiedad tBodies,
    que contiene el tbody de la tabla
  • propiedad rows,
    que contiene las filas de la tabla
  • propiedad cells,
    que contiene las celdas de la tabla