HTML DOM Tabla atributo summary
Definición y Uso
conjuntos de propiedades de resumen o devuelve una visión general de la tabla.
conjuntos de propiedades de resumen o devuelve una visión general de la tabla.
gramática
Establecer el atributo summary:
tableObject.summary="text"
Devuelve los atributos de resumen:
tableObject.summary
Consejo: Resumen de la propiedad no tiene un valor predeterminado.
值 | 描述 |
---|---|
text | 摘要文本 |
Soporte para el navegador
Todos los principales navegadores soportan atributo summary
Ejemplos
Ejemplos
Pop cuadro resumen:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult(){
alert(document.getElementById('myTable').summary);
}
</script>
</head>
<body>
<table id="myTable" border="1" summary="例如表中的员工">
<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()">显示表格描述</button>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult(){
alert(document.getElementById('myTable').summary);
}
</script>
</head>
<body>
<table id="myTable" border="1" summary="例如表中的员工">
<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()">显示表格描述</button>
</body>
</html>
Trate »
Tabla de objetos