Home > Web Front-end > JS Tutorial > Introduction to the location and function of the noscript element attribute in JavaScript_javascript skills

Introduction to the location and function of the noscript element attribute in JavaScript_javascript skills

WBOY
Release: 2016-05-16 17:37:21
Original
1187 people have browsed it
1. <script> element attributes </strong> <br>The main way to insert JavaScript into an XHTML page is to use the <script> element. This element has 5 attributes: charset, defer, language, and src. , type, the three commonly used ones are type, src, and defer. <br>1. The value of the type attribute is generally text/javascript. This attribute is required, <script type="text/javascript"/>. <br>2. The value of the src attribute is an *.js external file. This attribute is optional, <script type="text/javascript" src="example.js"/>. <br>In this example, the external file example.js will be loaded into the current page. The external file only needs to contain the Javascript code that would normally be placed between the opening <script> and the closing </script>. Just like parsing embedded Javascript code, page processing will also be temporarily stopped when parsing external Javascript files. It should be noted that with the src attribute, additional Javascript code should not be included between <script> and </script>.
3. The value of the defer attribute is "defer", which means that the script can be delayed until the document is completely parsed and displayed before execution. This attribute is optional,



In the following two cases, the content in the

tag of the above code will be displayed:
•The browser does not support scripts
•Browse The server supports scripting, but scripting is disabled.

In addition, users will never see the content in the

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template