TableRow sectionRowIndex 属性
实例
例子 1
点击不同的行,输出它们的位置:
alert("Section row index is: " + x.sectionRowIndex);
例子 2
返回 thead、tbody 和 tfoot 的 rows 集合中行的位置:
var x = document.getElementsByTagName("tr");
var txt = "";
var i;
for (i = 0; i < x.length; i++) {
  txt = txt + "The index of Row "+(i+1)+" is: "+x[i].sectionRowIndex+"<br>";
}
语法
返回 sectionRowIndex 属性:
tablerowObject.sectionRowIndex
技术细节
| 返回值: | 数值,表示行在 tbody、thead 或 tfoot 的 rows 集合 中的位置。 | 
|---|
浏览器支持
| Chrome | Edge | Firefox | Safari | Opera | 
|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Opera | 
| 支持 | 支持 | 支持 | 支持 | 支持 |