HTML引入外部JS文件

<!--引入外部文件的方式-->
<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

猜你喜欢

转载自www.cnblogs.com/sea-stream/p/11504019.html