To add JavaScript to a web page, you can use the following techniques:
The <SCRIPT> HTML tag containing the script source text
From an external file using the <SCRIPT SRC="filename.js"> HTML tag and attribute
From an external file using the <SCRIPT ARCHIVE="" SRC=""> HTML tag and attributes
With an event handler attribute
In a javascript: URL.
By means of a JavaScript style sheet
As a JavaScript entity value for an HTML attribute
Within a conditional comment
Refer to the individual topics for specific details covering each case.
| Prev | Home | Next |
| Add then assign (+=) | Up | Additive expression |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||