简体   繁体   中英

Why won't my JavaScript work on GitHub Pages?

After the events of this question I asked , where my CSS wasn't working on GitHub, I created a JavaScript file, and now that file isn't working.

I have a button in the HTML, and when you click it, your unit of currency (right now: cookies; remember that this game is Sweet Shoppe) is supposed to go up, but nothing's happening when I click it.

Here's the link to the repo one more time. Can someone look at the JS file and see what's going wrong this time?

Thanks.

Your HTML markup is incorrect:

<link href="js/main.js" type="text/javascript">

should be

<script src="js/main.js" type="text/javascript"></script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM