378 Chapter 21 – Interactivity
Interactive Buttons with JavaScript
Web Design in a Nutshell, eMatter Edition
B The function for activating the rollover buttons (turning them to their “on”
state) now includes an additional line that changes the image in the “holder”
graphic to one of the informational graphics.
C Similarly, the deactivate function in the JavaScript now contains a line that
returns the “holder” graphic back to its “off” state (displaying “clear.gif”).
D This is theIMGtag namedholderwhere the information graphics will appear.
It contains a graphic called “clear.gif” when neither button is activated.
Example 21-2: JavaScript Code for Multiple Rollovers (continued)