Table tFootPropriété
Objet Table
Définition et utilisation
La propriété tFoot renvoie une référence à l'élément tfoot du tableau.
L'élément tfoot est utilisé pour regrouper le contenu de pied de page d'un tableau HTML.
Syntaxe
tableObject.tFoot
Prise en charge des navigateurs
![]()
![]()
![]()
![]()
![]()
Tous les navigateurs principaux prennent en charge la propriété tFoot
Exemple
Exemple
Afficher le HTML à l'intérieur de <tfoot> :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Tutoriel d'exemple(example.com)</title>
<script>
function displayResult(){
alert(document.getElementById('myTable').tFoot.innerHTML);
}
</script>
</head>
<body>
<table id="myTable" border="1">
<thead>
<tr>
<th>Mois</th>
<th>Épargne</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Somme</td>
<td>$180</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Janvier</td>
<td>$100</td>
</tr>
<tr>
<td>Février</td>
<td>$80</td>
</tr>
</tbody>
</table>
<br>
<button type="button" onclick="displayResult()">Afficher le contenu du pied de page</button>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>Tutoriel d'exemple(example.com)</title>
<script>
function displayResult(){
alert(document.getElementById('myTable').tFoot.innerHTML);
}
</script>
</head>
<body>
<table id="myTable" border="1">
<thead>
<tr>
<th>Mois</th>
<th>Épargne</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Somme</td>
<td>$180</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Janvier</td>
<td>$100</td>
</tr>
<tr>
<td>Février</td>
<td>$80</td>
</tr>
</tbody>
</table>
<br>
<button type="button" onclick="displayResult()">Afficher le contenu du pied de page</button>
</body>
</html>
Essayez-le vous-même »
Objet Table Autres extensions