Simple Examples of JavaScript Use

Based on the Netscape JavaScript Guide. For more information, read a local copy of this guide.

Embedded Scripts

Scripts from Source Files

JavaScript Expressions as HTML Values

The width of the horizontal rule below this paragraph is based on the value of a JavaScript variable.


JavaScript Event Handlers in HTML Tags

Pointing to the link below will display a message in the status bar.
ACG Home

This page uses JavaScript, so you need to get Netscape Navigator 2.0 or later

If you are already using Navigator 2.0 or later, and you see this message, you should enable JavaScript by choosing Network Preferences from the Options menu. If you are using Communicator, this setting is in the Advanced Preferences.