the location of the label
If the page requires a lot of JavaScript code, this will undoubtedly cause the browser to have a noticeable delay in rendering the page, while the browser window in the delay period will be blank. To avoid this problem, modern WEB applications typically place all JavaScript references behind the page content in the <body> element, as shown in the following example:
<!DOCTYPE HTML><HTML><Head><title>Example HTML Page</title></Head><Body><!--here to put the content -<Scripttype= "Text/javascript"src= "Example1.js"></Script><Scripttype= "Text/javascript"src= "Example2.js"></Script></Body></HTML>
Delay script
HTML 4.01 defines the defer attribute for the <script> tag, which is used when the script is deferred until the entire page has been parsed and then run.
<!DOCTYPE HTML><HTML><Head><title>Example HTML Page</title><Scripttype= "Text/javascript"defer= "Defer"src= "Example1.js"></Script><Scripttype= "Text/javascript"defer= "Defer"src= "Example2.js"></Script></Head><Body><!--here to put the content -</Body></HTML>
JavaScript Advanced Programming (3rd edition) | Study notes (1): Using JavaScript in HTML