30/09/2014

JavaScript Where To

In HTML, JavaScripts must be inserted between <script> and </script> tags. JavaScripts can be put in the <body> and in the <head> section of an HTML page.The <script> Tag
To insert a JavaScript into an HTML page, use the <script> tag. The <script> and </script> tells where the JavaScript starts and ends. The lines between <script> and </script> contain the JavaScript code
Example:
<script>function myFunction() {document.getElementByI d("demo").innerHTML ="My First JavaScript Function";} </script> /font>
You don't have to understand the code above. Just take it for a fact, that the browser will interpret the code between the <script> and </script> tags as JavaScript.