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

 

 

 

posted @ 2019-09-11 00:25  anobscureretreat  阅读(22281)  评论(0编辑  收藏  举报