This time I will show you how to dynamically introduce JS files. What are theprecautions for dynamically introducing JS files? Here are practical cases, let’s take a look.
index.html
test.js
alert("hello! I am test.js"); var str="1";
dynamic.js
//第一种方式:直接document.write 但这样会把当前的页面全覆写掉 //document.write("