<!–引入外部文件的方式–>
<script type=”text/javascript” src=”attack.js”></script>
 
//attack.js 代码
function attackEnemy() {
document.write("land on");
alert("ready go");
}

 

参考:

https://blog.csdn.net/u012871987/article/details/72638373/

http://www.fly63.com/article/detial/1183

https://www.cnblogs.com/miaoying/p/8337613.html

 

 

 

版权声明:本文为sea-stream原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/sea-stream/p/11504019.html