home / experts / javascript / column1 |
|
Creating an
The following statement preloads the desired image:
Notice the use of the A JavaScript rollover requires at least two images. For example, take a look at the following images:
Note that the active and inactive images in a rollover must both be the same size. Otherwise, the active image is automatically adjusted to the size of the inactive image. The following script shows how to combine these two images into an appealing JavaScript rollover:
The corresponding HTML code for this rollover is:
Here's the result: Try placing the mouse over the image. If you click it, this page will reload, because the URLs in our example aren't real. |
Created: August 21, 1997
Revised: March 30, 1998
URL: http://www.webreference.com/js/column1/create.html