diff options
Diffstat (limited to 'files/zh-cn/web/api/htmltableelement/deletethead/index.html')
-rw-r--r-- | files/zh-cn/web/api/htmltableelement/deletethead/index.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/htmltableelement/deletethead/index.html b/files/zh-cn/web/api/htmltableelement/deletethead/index.html new file mode 100644 index 0000000000..bd9b5bf6ef --- /dev/null +++ b/files/zh-cn/web/api/htmltableelement/deletethead/index.html @@ -0,0 +1,63 @@ +--- +title: HTMLTableElement.deleteTHead() +slug: Web/API/HTMLTableElement/deleteTHead +tags: + - API + - table + - 参考 +translation_of: Web/API/HTMLTableElement/deleteTHead +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><code><strong>HTMLTableElement.deleteTHead()</strong></code> 方法删除指定 {{HtmlElement("table")}} 的 {{HTMLElement("thead")}} 元素。</p> + +<h2 id="语法">语法</h2> + +<pre class="syntaxbox"><var>HTMLTableElement</var>.deleteTHead(); +</pre> + +<h2 id="例子">例子</h2> + +<p>本示例使用 JavaScript 删除表格的头部。</p> + +<h3 id="HTML">HTML</h3> + +<pre class="brush: html; highlight:[2]"><table> + <thead><th>Name</th><th>Occupation</th></thead> + <tr><td>Bob</td><td>Plumber</td></tr> + <tr><td>Jim</td><td>Roofer</td></tr> +</table></pre> + +<h3 id="JavaScript">JavaScript</h3> + +<pre class="brush: js; highlight:[2]">let table = document.querySelector('table'); +table.deleteTHead();</pre> + +<h3 id="结果">结果</h3> + +<p>{{EmbedLiveSample("Example")}}</p> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">规范</th> + <th scope="col">状态</th> + <th scope="col">备注</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', '#dom-table-deletethead', 'HTMLTableElement: deleteTHead')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + + + +<p>{{Compat("api.HTMLTableElement.deleteTHead")}}</p> |