With the Document Object Model (DOM), you can almost dynamically create all of the content in HTML with JavaScript. The point is that the,<script> tag does not differ from the other elements in the page: All can be moved, deleted, or even created in a document through a DOM reference. The standard Dom method makes it very easy to create a new Year's <script> element:
Copy Code code as follows:
<script type= "Text/javascript" >
var script=document.createelement ("script");
Script.type= "Text/javascript";
Script.src= "File1.js";
Document.getelementbytagname ("Head") [0].appendchild (script);
</script>
The newly created <script> element loads the File1.js file. The file starts downloading when the element is added to the page. The point of this technique is that no matter when the download is started, the download and execution of the file does not block other processes on the page. You can even place the code in the page