Monday, 21 July 2014

External javascript files...

I kind of ignored my work today and learned more about Javascript and the like.

A key learning point:
Making and calling external Javascript files.
Sometimes this is useful although I don't know how wise it is.

From here, I found out how to do it:

  • put the script into a separate file with the file name, example.js
  • make sure the file begins with 
    • <!--     
    • and ends with
    •   -->
  • Within the html file this is how to call the script:
    • <script src="example.js">
    • </script>
  • The location of the script is important and the src bit describes the location. 




No comments:

Post a Comment