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 |
浏览器兼容性
加载中…