Table summaryPropiedad
Objeto Table
Definición y uso
La propiedad summary puede establecer o devolver el resumen de la tabla.
La propiedad summary puede establecer o devolver el resumen de la tabla.
Sintaxis
Establecer la propiedad summary:
tableObject.summary="text"
Devolver la propiedad summary:
tableObject.summary
Consejo:La propiedad summary no tiene valor predeterminado.
| Valor | Descripción |
|---|---|
| text | Texto de resumen |
Soporte del navegador
![]()
![]()
![]()
![]()
![]()
Todos los navegadores principales soportan la propiedad summary
Ejemplo
Ejemplo
Mostrar el resumen de la tabla:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Tutorial Ejemplo (example.com)</title>
<script>
function displayResult(){
alert(document.getElementById('myTable').summary);
}
</script>
</head>
<body>
<table id="myTable" border="1" summary="Por ejemplo, empleados en la tabla">
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
<br>
<button type="button" onclick="displayResult()">Mostrar descripción de la tabla</button>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>Tutorial Ejemplo (example.com)</title>
<script>
function displayResult(){
alert(document.getElementById('myTable').summary);
}
</script>
</head>
<body>
<table id="myTable" border="1" summary="Por ejemplo, empleados en la tabla">
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
<br>
<button type="button" onclick="displayResult()">Mostrar descripción de la tabla</button>
</body>
</html>
Pruébalo »
Objeto Table Otras extensiones