Web Development Articles
JavaScript: Include External .js Files
Published: 13th Mar 2006
Revised: 27th Mar 2006
Instead of embedding JavaScript code directly in an HTML document you can reference an external JavaScript file (with extension .js). This file simply contains all the JavaScript code you want to use. The beauty of including external .js files is that you can make changes in that .js file and the affects will be seen in every HTML page that includes that file. The following code can be used to include a JavaScript (.js) file:
<script type="text/javascript" src="path/folder/yourScript.js">
</script>
This code can be used within the "head" or "body" tags of an HTML page.

Related Links
Related Articles / Posts
Photoshop to Valid XHTML/CSS Coding Service (30/03/2009)
Relative File (Virtual) Inclusion - Server Side Includes (SSI) (23/03/2007)
CSS Layouts Without Tables - Tableless Design (Article) (07/11/2006)
The Origin of the Internet and Hypertext (Article) (25/10/2006)
Code Editors (Syntax Highlighting) - Aptana, Crimson Editor, PHP Designer (14/08/2006)