How to Reference Javascript
There are three methods that can be used to have a script affect your page. These methods are External, Embed, and Inline.
- External:- The javascript is written into a seperate text file and is referenced from within the web page document. It is written:
- <script language="javascript" type="text/javascript" src="name-of-the-file.txt"><--
// --></script>
-
Example of External
- Embed:- The script is written either in the head or the body of the document. It is written:
-
<script language="javascript" type="text/javascript"><--
the script would be written here between the script tags
// --></script>
-
Example of Embed
- Inline:- The script would be written into an html tag. Like so:
Hope that this helps you...
Author: Joseph Raymond
12th of December, 2000