TableRow sectionRowIndex خاصية
مثال
انقر فوق صفوف مختلفة لتنبيه موقعهم:
alert("Section row index is: " + x.sectionRowIndex);
التعريف والاستخدام
تُرجع الخاصية sectionRowIndex موضع الصف في مجموعة الصفوف لـ <tbody> أو <thead> أو <tfoot>.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
sectionRowIndex | Yes | Yes | Yes | Yes | Yes |
بناء الجملة
قم بإرجاع خاصية sectionRowIndex:
tablerowObject.sectionRowIndex
تفاصيل تقنية
قيمة الإرجاع: | رقم يمثل موضع الصف في مجموعة الصفوف من tbody أو thead أو tfoot |
---|
مزيد من الأمثلة
مثال
أعد موضع الصفوف في مجموعة صفوف thead و tbody و tfoot:
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