+ 1
How can i include Java script in html?
5 Respostas
+ 7
Uite aici cum se face.....ar trebui sa începi cursul de javascript acolo scrie negru pe alb.
https://code.sololearn.com/Wiv9Z9z3L6Az/?ref=app
https://code.sololearn.com/WJly9ZuywWBU/?ref=app
+ 5
Add <script src=app.js></script> right before closing </body>
Create a app.js put your js code there and save.
+ 5
There are generally two ways how to do this: (1) via external JS-file or (2) integrating JS code in your HTML file.
Here it is how to be done:
1) via external file:
Create your JS-file, e.g. yourJsFile.js in the same folder as your HTML-file. Then add the following tag right above the </body>-tag in your HTML file (don't forget the quotation marks around "yourJsFile.js"):
<script src="yourJs.File.js"></script>
2) integrating JS code in your HTML file:
Write the <script></script> tags just before the </body>-tag inside your HTML-file and write your code between the script tag. For example:
<!doctype html>
<html>
<head>
</head>
<body>
<script>
// put your JS code here
</script>
</body>
</html>
+ 2
if you think my answer helped, then please consider marking it as the best answer. thank you in advance.
0
ty