TableData ခေါင်းစီးများ ပိုင်ဆိုင်မှု
ဥပမာ
ID "myTd" ဖြင့် <td> ဒြပ်စင်တစ်ခု၏ ခေါင်းစီးရည်ညွှန်းချက်၏ တန်ဖိုးကို ပြန်ပေးပါ။
var x = document.getElementById("myTd").headers;
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
headers ပိုင်ဆိုင်မှုသည် headers attribute ၏တန်ဖိုးကို သတ်မှတ် သို့မဟုတ် ပြန်ပေးသည်။
headers attribute သည် လက်ရှိ data cell အတွက် header information ပါဝင်သော header cells များစာရင်းကို သတ်မှတ်ပေးပါသည်။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
headers | Yes | Yes | Yes | Yes | Yes |
အထားအသို
ခေါင်းစီးပိုင်ဆိုင်မှုကို ပြန်ပေးပါ။
tabledataObject.headers
ခေါင်းစီးပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
tabledataObject.headers = header_ids
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
header_ids | Specifies a space-separated list of id's to one or more header cells the table cell is related to |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ခေါင်းစီးဆဲလ် ခွဲခြားသတ်မှတ်မှုစာရင်းတွင် နေရာလွတ် ခြားထားသော စာကြောင်းတစ်ခု |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
ဒုတိယအတန်း၏ ဆဲလ်ခေါင်းများကို ပြသသည်-
var table = document.getElementById("myTable");
var txt = "";
var i;
for (i = 0; i < table.rows[1].cells.length; i++) {
txt = txt + table.rows[1].cells[i].headers + "<br>";
}
ဥပမာ
ID "myTd" ဖြင့် <td> ဒြပ်စင်တစ်ခု၏ ခေါင်းစီးရည်ညွှန်းချက်၏ တန်ဖိုးကို ပြောင်းလဲပါ-
document.getElementById("myTd").headers = "newValue";
ဆက်စပ်စာမျက်နှာများ
HTML ရည်ညွှန်း- HTML <td> ခေါင်းစီးများ ရည်ညွှန်းချက်
❮ TableData Object