Latest web development tutorials

HTML DOM tr propiedad sectionRowIndex

tr referencia de objeto objetos tr

Definición y Uso

TsectionRowIndex propiedad devuelve una fila TBODY, THEAD, o TFOOT filas punto de recogida

gramática

Volver propiedades sectionRowIndex:

trObject.sectionRowIndex

Consejo: sectionRowIndex propiedad tiene ningún valor predeterminado.


Soporte para el navegador

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Todos los principales navegadores soportan la propiedad sectionRowIndex


Ejemplos

Ejemplos

Pop THEAD, TBODY, tfoot línea de recogida de Filas aquí:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult(x){
    alert("Section row index is: " + x.sectionRowIndex);
}
</script>
</head>
<body>

<table border="1">
    <thead>
        <tr onclick="displayResult(this)">
            <th>单击显示行下标</th>
        </tr>
        <tr onclick="displayResult(this)">
        <th>单击显示行下标</th>
        </tr>
</thead>
<tbody>
        <tr onclick="displayResult(this)">
        <td>单击显示行下标</td>
        </tr>
        <tr onclick="displayResult(this)">
        <td>单击显示行下标</td>
        </tr>
</tbody>
<tfoot>
        <tr onclick="displayResult(this)">
        <td>单击显示行下标</td>
        </tr>
        <tr onclick="displayResult(this)">
        <td>单击显示行下标</td>
        </tr>
</tfoot>
</table>

</body>
</html>

Trate »


tr referencia de objeto objetos tr