November 2002
Beginner
432 pages
11h 44m
English
Like Visual Basic event procedures, JavaScript supports events and event handlers. When an event occurs, such as the user clicking the mouse, that event's handler executes if you've supplied the handler code. For example, if the user clicks the mouse over a button on a Web page form, the button's onClick event is triggered only if you have written code for it.
In Chapter 18, you saw a JavaScript rollover routine that uses the onMouseOver and onMouseOut event handlers. The code for the onMouseOver event executes automatically when the user viewing the Web page moves the mouse pointer over the button assigned to the onMouseOver event. The code for the onMouseOut event executes automatically when the user viewing ...