HTML-DOM tr sectionRowIndex Eigenschaft
Definition und Verwendung
TsectionRowIndex Eigenschaft gibt eine Reihe TBODY, THEAD oder TFOOT Reihen Sammelstelle
Grammatik
Zurück sectionRowIndex Eigenschaften:
trObject.sectionRowIndex
Tipp: sectionRowIndex Eigenschaft hat keinen Standardwert.
Browser-Unterstützung
Alle gängigen Browser unterstützen sectionRowIndex Eigentum
Beispiele
Beispiele
Pop THEAD, TBODY, TFOOT Reihen Sammelleitung hier:
<!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>
<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>
Versuchen »
tr Objekte