HTMLTableElement: createTFoot() 方法
HTMLTableElement 物件的 createTFoot() 方法會返回與給定 <table> 關聯的 <tfoot> 元素。如果表中不存在頁尾,則此方法會建立它,然後返回它。
注意: 如果不存在頁尾,createTFoot() 會直接在表中插入一個新頁尾。頁尾不需要像使用 Document.createElement() 建立新 <tfoot> 元素時那樣單獨新增。
語法
js
createTFoot()
引數
無。
返回值
HTMLTableSectionElement
示例
js
let myFoot = myTable.createTFoot();
// Now this should be true: myFoot === myTable.tFoot
規範
| 規範 |
|---|
| HTML # dom-table-createtfoot-dev |
瀏覽器相容性
載入中…