Inserting a Rollover Image

One of the most common uses of JavaScript on Web pages is to create a rollover—an image that changes when the user moves the pointer over it. Rollovers combine the use of two images within the same space. When a visitor first arrives at a page that uses rollovers, those image combinations are displayed in their original states. As the pointer moves over the rollover image, a new image is swapped into its place. The new image is sometimes referred to as the on or over state of an image. As the user rolls the pointer off of the image, it can either swap back to the original image or remain changed. A rollover is a basic application of interactivity—it gives the user a response to the act of moving the pointer over the ...

Get macromedia Dreamweaver 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.