0
How to save java script
which save as type
1 Odpowiedź
+ 1
Write the JS in separate file and save the file with a .js extension.
Once the file has been saved, you can call it from the HTML code via the src attribute of the opening script tag, as shown below for sample.js.
<script type="text/javascript" src="sample.js"></script>
or include js inside head tag
<head>
<script type="text/javascript">
Your JavaScript code will go here...
</script>
</head>