+ 1
JavaScript
How do I link my JavaScript file to the html ?
5 ответов
+ 3
To do that, first insert the <script> tag into your HTML file as following:
<script src="LocationInFolder"></script>
If you want to run the file before the page loads, put the tag in the <head> tag.
If you want to run the file after the page loads, put the tag in the <body> tag.
+ 4
Hello Ernest Samuel
Please take a look at the sololearn Tutorial HTML, CSS3 and Javascript.
That is the fastest way to learn this.
Regards kiuziu
+ 3
<script src="filename.js" type= "text/javascript"/>
+ 1
thank you
+ 1
Put the two files ( html and Javascript) in the same folder
between < head > and </head>
<script src = "nameOfJavaScriptFile.js"></script>