attack.html code:
attack.js code
function attackEnemy() { document.write("land on"); alert("ready go"); }
Thank you for reading, I hope you will benefit a lot.
This article is transferred from: https://blog.csdn.net/u012871987/article/details/72638373
Recommended tutorial: “HTML Tutorial”
The above is to teach you how to For more details on introducing external JS files into HTML, please pay attention to other related articles on 1024programmer.com!