September 30, 1999 - Using External Scripts

Yehuda Shiran September 30, 1999
Using External Scripts
Tips: September 1999

Yehuda Shiran, Ph.D.
Doc JavaScript

If you want to include several lines of JavaScript code in your HTML document, you're be better off with a simple script:

<SCRIPT LANGUAGE="JavaScript">
<!--
// -->
</SCRIPT>

If you're working on a longer script, you might want to implement an external script:

<SCRIPT LANGUAGE="JavaScript" SRC="external.js">
<!--
// -->
</SCRIPT>

An external script is interpreted as if it precedes the local script. For a complete example take a look at our banner script in Column 13, Scrolling JavaScript Banners.