TableRow အပိုင်း RowIndex Property
ဥပမာ
၎င်းတို့၏ အနေအထားကို သတိပေးရန် မတူညီသောအတန်းများကို နှိပ်ပါ-
alert("Section row index is: " + x.sectionRowIndex);
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
sectionRowIndex ပိုင်ဆိုင်မှုသည် <tbody>၊ <thead> သို့မဟုတ် <tfoot> ၏အ တန်း များစုစည်းမှုတွင် အတန်းတစ်ခု၏အနေအထားကို ပြန်ပေးသည်။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
sectionRowIndex | Yes | Yes | Yes | Yes | Yes |
အထားအသို
sectionRowIndex ပိုင်ဆိုင်မှုကို ပြန်ပေးပါ-
tablerowObject.sectionRowIndex
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | နံပါတ်တစ်ခု၊ tbody၊ thead သို့မဟုတ် tfoot စုစည်းမှု အတန်းရှိ အတန်း၏ အနေအထားကို ကိုယ်စားပြုသော နံပါတ် |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
ကြော်ငြာ၊ 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 အရာဝတ္ထု