Propriedade tFoot
A propriedade tFoot armazena uma referência ao
tfoot
da tabela.
Sintaxe
tabela.tFoot;
Exemplo
Vamos colorir o rodapé da tabela em vermelho:
<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>
let table = document.querySelector('#table');
table.tFoot.style.color = 'red';