HTMLTemplateElement

HTMLTemplateElement interface enables access to the contents of an HTML <template> 元素。

特性

This interface inherits the properties of HTMLElement .

content 只读
A read-only DocumentFragment which contains the DOM subtree representing the <template> element's template contents.

方法

This interface inherits the methods of HTMLElement .

规范

规范 状态 Comment
HTML Living Standard
The definition of 'HTMLTemplateElement interface' in that specification.
实时标准
HTML5
The definition of 'HTMLTemplateElement interface' in that specification.
Recommendation 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
HTMLTemplateElement Chrome 26 Edge 13 Firefox 22 IE No Opera 15 Safari 8 WebView Android Yes Chrome Android 26 Firefox Android 22 Opera Android Yes Safari iOS 8 Samsung Internet Android 1.5
content Chrome 26 Edge 13 Firefox 22 IE No Opera 15 Safari 8 WebView Android Yes Chrome Android 26 Firefox Android 22 Opera Android Yes Safari iOS 8 Samsung Internet Android 1.5

图例

完整支持
完整支持
不支持
不支持