TableRow sectionRowIndex Property
Definition and Usage
sectionRowIndex
Property returns the position of the row in <tbody>, <thead> or <tfoot>: Samling av rader platsen.
See also:
HTML Reference Manual:HTML <tr>-taggen
Instance
Example 1
Click on different rows to output their positions:
alert("Section row index is: " + x.sectionRowIndex);
Example 2
Return the position of rows in the thead, tbody and tfoot row collections:
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>"; }
Syntaks
Returnera sectionRowIndex-attribut:
tablerowObject.sectionRowIndex
Tekniska detaljer
Returvärde: | Tal, som representerar radens plats i tbody, thead eller tfoot Samling av rader platsen. |
---|
Webbläsarstöd
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Stöd | Stöd | Stöd | Stöd | Stöd |