createTFoot()
Table createTFoot() metodi
Misol
<tfoot> elementini yarating (va unga <tr> hamda <td> elementini joylashtiring):
// 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>";
O‘zingiz sinab ko‘ring »
Tavsif
createTFoot() metodi bo‘sh <tfoot> elementini yaratadi va uni jadvalga qo‘shadi.
Eslatma: Agar jadvalda <tfoot> elementi allaqachon mavjud bo‘lsa, createTFoot() metodi mavjud elementni qaytaradi va yangisini yaratmaydi.
Eslatma: <tfoot> elementi ichida bir yoki bir nechta <tr> tegi bo‘lishi shart.
Maslahat: Jadvaldan <tfoot> elementini olib tashlash uchun deleteTFoot() metodidan foydalaning.
Brauzerlarda qo‘llab-quvvatlash
| Metod | |||||
|---|---|---|---|---|---|
| createTFoot() | Ha | Ha | Ha | Ha | Ha |
Sintaksis
tableObject.createTFoot()
Parametrlar
| Yo‘q |
Texnik tafsilotlar
| Qaytariladigan qiymat: | Yangi yaratilgan (yoki mavjud) <tfoot> elementi |
|---|
Ko‘proq misollar
Misol
<tfoot> elementini yarating va o‘chiring:
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();
}
O‘zingiz sinab ko‘ring »
Tegishli sahifalar
HTML ma’lumotnomasi: HTML <tfoot> tegi
❮ Table obyekti
W3Schools Pathfinder
Yutuqlaringizni kuzating – bu bepul!
