How to use External JavaScript

JavaScript can also be put as an external files like as CSS files. JavaScript files saved with the extention of ".js". 
When using an External script, you can't use the <script>...</script> tags. Use src attribute of the <Script> tag to specify the .js external javascriptfile.

<html>
   <head>
      <script type = "text/javascript" src = "test.js" > </script>
   </head>
</html>

No comments:

Post a Comment