HTMLTableElement.createTHead()
方法返回
<thead>
element associated with a given
<table>
. If no header exists in the table, this method creates it, and then returns it.
注意:
If no header exists,
createTHead()
inserts a new header directly into the table. The header does not need to be added separately as would be the case if
Document.createElement()
had been used to create the new
<thead>
元素。
HTMLTableSectionElement = table.createTHead();
let myhead = mytable.createTHead(); // Now this should be true: myhead == mytable.tHead
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'HTMLTableElement: createTHead' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
createTHead
|
Chrome Yes | Edge 12 | Firefox Yes | IE Yes | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android ? | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android ? |
完整支持
兼容性未知