User Selectable Background Color

Event handlers (in this case button onClick handlers) can change the document background color.

demo     source

Active Bullets (Mouseover Images)

You can use images as linked bullets and have the image change when the user moves the mouse over the image. The general idea is to use the onMouseOver and onMouseOut events to switch the SRC attribute of an image.

demo     source

Netscape Layers

Netscape supports HTML layers (IE does not!). You can turn on an off individual layers in response to user actions.

demo     source

Move the Browser

You can use the navigator object to alter browser attributes include the window size and the position of the browser on your screen. The example works with both IE and Netscape, although IE doesn't seem to let JavaScript change the window size.

demo     source

Moving Cookie Game (uses Netscape Layers)

A complete game (OK, a simple silly game) written in JavaScript. This script uses:

  • the JavaScript function setTimeout to schedule a subroutine call a short time in the future.
  • Button event handlers
  • Text Input event handlers
  • Netscape Layers - to move an image around in the browser window (so it only works with Netscape).

demo     source

Popup Window

How to use JavaScript to create those annoying popup windows containing advertisements.

demo     source

JavaScript Object Property Lists

Using JavaScript you can access and alter object properties, including some properties of the document. The example here generates a list of all the properties of the object document.

demo     source

Using a SELECT as a Menu

You can turn a SELECT form element in to a menu. Once the user selects a new menu item - the browser takes action immediately (it's not necessary for the user to press a "go" or "submit" button). The example includes two selects, one changes a form field value and the other jumps to another JavaScript demo.

demo     source

JavaScript Generated BACK hyperlink

An example of using JavaScript to generate a document footer including a BACK hyperlink.

demo     source

JavaScript Mortgage Calculator

You can write interactive calculators using JavaScript.

demo     source