diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/html/element/noscript | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/html/element/noscript')
-rw-r--r-- | files/zh-cn/web/html/element/noscript/index.html | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/element/noscript/index.html b/files/zh-cn/web/html/element/noscript/index.html new file mode 100644 index 0000000000..295bff18ef --- /dev/null +++ b/files/zh-cn/web/html/element/noscript/index.html @@ -0,0 +1,101 @@ +--- +title: <noscript> +slug: Web/HTML/Element/noscript +tags: + - <noscript> +translation_of: Web/HTML/Element/noscript +--- +<div>{{HTMLRef}}</div> + +<p>如果页面上的脚本类型不受支持或者当前在浏览器中关闭了脚本,则在 <strong>HTML <noscript> 元素</strong>中定义脚本未被执行时的替代内容。</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row"><a href="/en-US/docs/HTML/Content_categories" title="HTML/Content_categories">内容分类</a></th> + <td><a href="/en-US/docs/HTML/Content_categories#Metadata_content" title="HTML/Content_categories#Metadata_content">Metadata content</a>, <a href="/en-US/docs/HTML/Content_categories#Flow_content" title="HTML/Content categories#Flow content">flow content</a>, <a href="/en-US/docs/HTML/Content_categories#Phrasing_content" title="HTML/Content categories#Phrasing content">phrasing content</a>.</td> + </tr> + <tr> + <th scope="row">允许的内容</th> + <td> + <p>当脚本被禁用并且它是 {{HTMLElement("head")}}元素的后代时:以下顺序任意,零个或者多个{{HTMLElement("link")}}元素,零个或者多个{{HTMLElement("style")}}元素,零个或者多个{{HTMLElement("meta")}}元素。</p> + + <p>当脚本被禁用并且它不是 {{HTMLElement("head")}} 元素的子元素时:任何transparent content 都可以,但是在它的后代中必须没有 <code><noscript></code>元素。</p> + + <p>否则:flow content 或 phrasing content 。</p> + </td> + </tr> + <tr> + <th scope="row">标签省略</th> + <td> + <p>不允许,开始标签和结束标签都不能省略。</p> + </td> + </tr> + <tr> + <th scope="row">允许的父元素</th> + <td> + <p>如果没有根元素 <code><noscript></code>,或者在{{HTMLElement("head")}}元素中(仅用于HTML文档)也没有根元素 <code><noscript></code>,允许任何 <a href="/en-US/docs/HTML/Content_categories#Phrasing_content" title="HTML/Content_categories#Phrasing_content">phrasing content</a> 元素。</p> + </td> + </tr> + <tr> + <th scope="row">DOM接口</th> + <td>{{domxref("HTMLElement")}}</td> + </tr> + </tbody> +</table> + +<h2 id="属性">属性</h2> + +<p><span style="line-height: 21px;">该元素只包含 </span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">全局属性</a><span style="line-height: 21px;">.</span></p> + +<h2 id="示例">示例</h2> + +<pre class="brush: html"><noscript> + <!-- anchor linking to external file --> + <a href="http://www.mozilla.com/">External Link</a> +</noscript> +<p>Rocks!</p> +</pre> + +<h3 id="允许脚本时的结果">允许脚本时的结果</h3> + +<p>Rocks!</p> + +<h3 id="禁用脚本时的结果">禁用脚本时的结果</h3> + +<p><a class="external" href="http://www.mozilla.com/">External Link</a></p> + +<p>Rocks!</p> + +<h2 id="Specifications" name="Specifications"><font>规范</font></h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', 'scripting-1.html#the-noscript-element', '<noscript>')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'scripting-1.html#the-noscript-element', '<noscript>')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName('HTML4.01', 'interact/scripts.html#h-18.3.1', '<noscript>')}}</td> + <td>{{Spec2('HTML4.01')}}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性"><font>浏览器兼容性</font></h2> + +<p>{{Compat("html.elements.noscript")}}</p> |