SRC = "URL"
sets an external source for the script. If
is set then the contents of the
element are ignored. For example, the following code loads a script located in
The script in
myscript.js writes out the current date and time to the page:
SRC allows you to create script libraries that can be used in many pages in your web site. There were some problems with the use of
SRC for quite a while. The folks in Redmond were apparently drinking too much latte because MSIE failed to support
SRC until version4, making for a heap of webmaster headaches. Fortunately the overwhelming majority of people have evolved to MSIE 4 or later so
SRC is a reasonably stable attribute now.