Академический Документы
Профессиональный Документы
Культура Документы
5
User Defined functions for Image
Rollovers
• Three user-defined functions must be written for the
mouse events one for each state of the navigation bar
• The mouse event handlers to be used – onMouseOver,
onMouseDown, onMouse Up and onMouseOut
• Each function will do the following
use the button name, the state of the mouse associated
with the event handler and the filename extension to
construct the associated graphic filename for the state
Use getElementById() method to assign the filename to the
correct image location
Chapter 11: Using DOM to Enhance Web Pages 6
JavaScript User-Defined Functions for
Image Rollovers
8
Creating User-Defined Functions for
Image Rollovers