normas HTML DOM tabla de atributos
Definición y Uso
reglas conjuntos de propiedades o devuelve una tabla dentro del borde.
gramática
Configuración de las propiedades de reglas:
tableObject.rules="none|groups|rows|cols|all"
Devuelve reglas atributos:
tableObject.rules
值 | 描述 |
---|---|
none | 没有内部边界 |
groups | 显示行组和列组之间的内部边界 |
rows | 显示内部行之间的边界 |
cols | 显示的列之间内部边界 |
all | 显示行和列之间的内边界 |
Soporte para el navegador
Todos los principales navegadores soportan reglas de atributos
Nota: IE9 puede visualizar correctamente este atributo.Las versiones anteriores de IE, además de cuatro fronteras interiores, también se sumarán cuatro límite exterior.
Nota: Chrome y Safari se muestran correctamente este atributo: Además de la frontera interna externa también afecta a las fronteras exteriores.
Ejemplos
Ejemplos
En el siguiente ejemplo, se establece la forma de dos bordes internos diferentes:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function rows(){
document.getElementById('myTable').rules="rows";
}
function cols(){
document.getElementById('myTable').rules="cols";
}
</script>
</head>
<body>
<table id="myTable">
<tr>
<td>cell 1</td>
<td>cell 2</td>
</tr>
<tr>
<td>cell 3</td>
<td>cell 4</td>
</tr>
</table>
<br>
<button type="button" onclick="rows()">只显示行边界</button>
<button type="button" onclick="cols()">只显示列边界</button>
<p><b>注意:</b> rules属性在Internet Explorer 9之前版本不能正常显示。</p>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function rows(){
document.getElementById('myTable').rules="rows";
}
function cols(){
document.getElementById('myTable').rules="cols";
}
</script>
</head>
<body>
<table id="myTable">
<tr>
<td>cell 1</td>
<td>cell 2</td>
</tr>
<tr>
<td>cell 3</td>
<td>cell 4</td>
</tr>
</table>
<br>
<button type="button" onclick="rows()">只显示行边界</button>
<button type="button" onclick="cols()">只显示列边界</button>
<p><b>注意:</b> rules属性在Internet Explorer 9之前版本不能正常显示。</p>
</body>
</html>
Trate »
Tabla de objetos