简体   繁体   中英

load file javascript not working in html code

Here i want to load javascript in html code:

Html file in folder:

web/index.html

Javascript file in folder:

web/assets/script.js

Html load script code:

<script type="type/javascript" href="assets/script.js">

You can't load script with href, try with this code:

<script type="text/javascript" src="assets/script.js"></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