将外部js文件引入html,用js文件中的参数调用函数
1项目结构
2写一篇test.html的文章
//a . jsfunction ABC(str){ alert(str);}//test . html html head script type=' text/JavaScript ' src=' http : a . js '/script script type=' text/JavaScript ' window . onload=function(){ var fun=ABC;//参见abc职能指令手册(123);};/script/headbody/body/html3测试结果
以上就是边肖带来的把外部js文件引入html,用参数调用函数的方法的全部内容。希望大家多多支持我们~