Home >Web Front-end >HTML Tutorial >HTML element noscript usage introduction

HTML element noscript usage introduction

高洛峰
高洛峰Original
2017-02-23 13:11:041286browse

Generally, we use the noscript element to define alternative content (text) when the script is not executed, so as to inform the user of information. Client script support needs to be turned on to access more content

noscript Definition and Usage

The noscript element is used to define alternative content (text) when the script is not executed.

This tag can be used with browsers that recognize the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag but cannot support the script within it.
Differences between HTML and

Note: Browsers that cannot recognize the 3f1c4e4b6b16bbbd69b2ee476dc4f83a 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 3f1c4e4b6b16bbbd69b2ee476dc4f83a 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. !

Global attributes

The2b0b25ff593c5b6c03403dd6234ffb2c tag supports global attributes in HTML.

Example

##JavaScript

<body>
 ...
 ...</p> <p>  <script type="text/javascript">
   <!--
   document.write("Hello World!")
   //-->
 </script>

 <noscript>你的浏览器不支持javascript!</noscript>
 ...
 ...
</body>
VBScript

<body>
 ...
 ...
 <script type="text/vbscript">
  <!--
  document.write("Hello World!")
  &#39;-->
 </script>

 <noscript>你的浏览器不支持VBScript!</noscript>
 ...
 ...
</body>

More HTML For NoScript related articles, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn