ဇယား ဖန်တီးTFoot() နည်းလမ်း
ဥပမာ
<tfoot> ဒြပ်စင်တစ်ခုဖန်တီးပါ (ပြီး <tr> နှင့် <td> ဒြပ်စင်တစ်ခုကို ၎င်းသို့ထည့်ပါ)
// Find a <table> element with id="myTable":
var table = document.getElementById("myTable");
// Create an empty <tfoot> element and add it to the table:
var footer = table.createTFoot();
// Create an empty <tr> element and add it to the first position of <tfoot>:
var row = footer.insertRow(0);
// Insert a new cell (<td>) at the first position of the "new" <tr> element:
var cell = row.insertCell(0);
// Add some bold text in the new cell:
cell.innerHTML = "<b>This is a table footer</b>";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
createTFoot() နည်းလမ်းသည် ဗလာ <tfoot> ဒြပ်စင်ကို ဖန်တီးပြီး ၎င်းကို ဇယားတွင် ထည့်သည်။
မှတ်ချက်- <tfoot> ဒြပ်စင်တစ်ခု ဇယားပေါ်တွင် ရှိနှင့်ပြီးပါက၊ createTFoot() နည်းလမ်းသည် ရှိပြီးသားတစ်ခုကို ပြန်ပေးမည်ဖြစ်ပြီး အသစ်တစ်ခုကို ဖန်တီးမည်မဟုတ်ပါ။
မှတ်ချက်- <tfoot> ဒြပ်စင်တွင် တစ်ခု သို့မဟုတ် တစ်ခုထက်ပိုသော <tr> တဂ်များ ရှိရပါမည်။
အကြံပြုချက်- ဇယားတစ်ခုမှ <tfoot> ဒြပ်စင်ကို ဖယ်ရှားရန်၊ deleteTFoot() နည်းလမ်းကို အသုံးပြုပါ။
Browser ပံ့ပိုးမှု
Method | |||||
---|---|---|---|---|---|
createTFoot() | Yes | Yes | Yes | Yes | Yes |
အထားအသို
tableObject.createTFoot()
ကန့်သတ်ချက်များ
တစ်ခုမှ |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | အသစ်ဖန်တီးထားသော (သို့မဟုတ် ရှိပြီးသား) <tfoot> ဒြပ်စင် |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
<tfoot> ဒြပ်စင်တစ်ခုကို ဖန်တီးပြီး ဖျက်ပါ-
function myCreateFunction() {
var table = document.getElementById("myTable");
var footer = table.createTFoot();
var row = footer.insertRow(0);
var cell = row.insertCell(0);
cell.innerHTML = "<b>This is a table footer</b>";
}
function myDeleteFunction() {
document.getElementById("myTable").deleteTFoot();
}
ဆက်စပ်စာမျက်နှာများ
HTML ရည်ညွှန်း- HTML <tfoot> တဂ်
❮ ဇယားအရာဝတ္ထု