TableRow bölümüRowIndex Özellik
Örnek
Konumlarını uyarmak için farklı satırlara tıklayın:
alert("Section row index is: " + x.sectionRowIndex);
Tanım ve Kullanım
SectionRowIndex özelliği , bir <tbody>, <thead> veya <tfoot> satır koleksiyonundaki bir satırın konumunu döndürür .
Tarayıcı Desteği
Property | |||||
---|---|---|---|---|---|
sectionRowIndex | Yes | Yes | Yes | Yes | Yes |
Sözdizimi
SectionRowIndex özelliğini döndürün:
tablerowObject.sectionRowIndex
Teknik detaylar
Geri dönüş değeri: | Bir tbody, thead veya tfoot satır koleksiyonundaki satırın konumunu temsil eden bir Sayı |
---|
Daha fazla örnek
Örnek
thead, tbody ve tfoot satır koleksiyonundaki satırların konumunu döndür:
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>";
}
❮ TableRow Nesnesi