Methods that refer to dependent js files in javascript files

  • 2020-03-30 02:23:09
  • OfStack

If you need to import another dependent js file in a js file, just import the following code in the first js file:
 
var s=document.createElement("script"); 
s.src="/script/Map.js"; 
document.getElementsByTagName( "HEAD")[0].appendChild(s); 

The red part is the path of the dependent js file.

Related articles: