Home > Article > Web Front-end > HTML element noscript usage introduction_HTML/Xhtml_web page production
noscript definition and usage
Thenoscript element is used to define alternative content (text) when the script is not executed.
This tag can be used in browsers that recognize the <script> tag but cannot support the script within it. <br>Differences between HTML and XHTML<br>NONE<br>Tips and Notes: <br>Note: If the browser supports scripting, it will not display the text in a noscript element. </p>
<p>Note: Browsers that cannot recognize the <script> tag will display the content of the tag on the page. To prevent browsers from doing this, you should hide the script in comment tags. Older browsers (that don't recognize <script> tags) ignore comments and thus don't write the content of the tag to the page, while newer browsers know how to execute these scripts even if they are surrounded by comment tags. ! </p>
<p>Global properties</p>
The <p><noscript> tag supports global attributes in HTML. </p>
<p><font color="#ff0000">Example<br><br></font><strong>JavaScript</strong></p>
<p><br></p>
<div class="msgheader">
<div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode16'));"><u>Copy code</u></span></div>The code is as follows:</div>
<div class="msgborder" id="phpcode16">
<br><body><br> .. .<br> ...</p>
<p> <script type="text/javascript"><br> <!--<br /> document.write("Hello World!")<br /> //--><br> < ;/script><br> <br> <noscript>Your browser does not support javascript!</noscript><br> ...<br> ...<br></body><br> </div>
<p><strong>VBScript</strong></p>
<p><br></p>
<div class="msgheader">
<div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode17'));"><u>Copy code</u></span></div>The code is as follows:</div>
<div class="msgborder" id="phpcode17">
<br><body><br> .. .<br> ...<br> <script type="text/vbscript"><br> <!--<br /> document.write("Hello World!")<br /> '--> ;<br /> </script>
...
...
body>