<noscript>
如果页面上的脚本类型不受支持或者当前在浏览器中关闭了脚本,则在 HTML <noscript> 元素中定义脚本未被执行时的替代内容。
内容分类 (en-US) | Metadata content (en-US), flow content (en-US), phrasing content (en-US). |
---|---|
允许的内容 |
当脚本被禁用并且它是 当脚本被禁用并且它不是 否则:flow content 或 phrasing content。 |
标签省略 |
不允许,开始标签和结束标签都不能省略。 |
允许的父元素 |
如果没有根元素 |
DOM 接口 | HTMLElement |
属性
该元素只包含 全局属性 (en-US).
示例
html
<noscript>
<!-- anchor linking to external file -->
<a href="http://www.mozilla.com/">External Link</a>
</noscript>
<p>Rocks!</p>
允许脚本时的结果
Rocks!
禁用脚本时的结果
Rocks!
规范
Specification |
---|
HTML Standard # the-noscript-element |
浏览器兼容性
BCD tables only load in the browser