Home > Web Front-end > JS Tutorial > JavaScript study notes (1) Using JavaScript in HTML_Basic knowledge

JavaScript study notes (1) Using JavaScript in HTML_Basic knowledge

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 17:52:38
Original
969 people have browsed it

1. Methods to delay script running:
Method 1: Place all javascript references in the element, after the page content, such as

Copy the code The code is as follows:



Example 1
< /head>






Method 2: Define the defer attribute defer="defer" for the <script> element, such as <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="77320" class="copybut" id="copybut77320" onclick="doCopy('code77320')"><u>Copy the code </u></a></span> The code is as follows :</div> <div class="codebody" id="code77320"> <br><html> <br><head> <br><title>Example 1</title> <br><script type="text/javascript" defer=" defer" src="example1.js"></script>






Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template