js 调用外部js

var   new_element=document.createElement("script");
 new_element.setAttribute("type","text/javascript");
 new_element.setAttribute("src","1.js");// 在这里引入了a.js
 document.body.appendChild(new_element);

猜你喜欢

转载自blog.csdn.net/ozhy111/article/details/82146322