?
本文檔使用 php中文網(wǎng)手冊 發(fā)布
如果頁面上的腳本類型不受支持或者當(dāng)前在瀏覽器中關(guān)閉了腳本,則在HTML <noscript> 元素中定義腳本未被執(zhí)行時(shí)的替代內(nèi)容。
內(nèi)容類別 | Metadata content, flow content, phrasing content. |
---|---|
允許的內(nèi)容 | 當(dāng)腳本被禁用并且它是 當(dāng)腳本被禁用并且它不是 否則:flow content 或 phrasing content 。 |
標(biāo)記遺漏 | 沒有,起始和結(jié)束標(biāo)簽都是強(qiáng)制性的。 |
允許父母 | 任何接受短語內(nèi)容的元素,如果沒有祖先<noscript>元素,或者在一個(gè)<head>元素中(但只對一個(gè)HTML文檔),這里再次如果沒有祖先<noscript>元素。 |
允許ARIA角色 | 沒有 |
DOM界面 | HTMLElement |
這個(gè)元素只包含全局屬性。
<noscript> <!-- anchor linking to external file --> <a href="https://www.mozilla.com/">External Link</a></noscript><p>Rocks!</p>
Rocks!
External Link
Rocks!
Specification | Status | Comment |
---|---|---|
HTML Living StandardThe definition of '<noscript>' in that specification. | Living Standard | |
HTML5The definition of '<noscript>' in that specification. | Recommendation | |
HTML 4.01 SpecificationThe definition of '<noscript>' in that specification. | Recommendation |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | 1 | (Yes) | (Yes) | (Yes) |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes) | 1 | (Yes) | (Yes) | (Yes) |