9.2. Controlling objects with event handlers

You’ve already encountered some examples of mouse events and mouse control in Chapter 6. These examples are just special cases of event handlers.

An event handler is basically a software tool used to handle application events that are generated normally by hardware devices such as the keyboard and mouse. For example, when a mouse runs over an object on a Web page, the browser will generate a mouse-over event. If you have the onmouseover handler installed, it will be triggered and perform appropriate actions (script statements or functions) designed by the author. An event model is the internal structure of a browser dealing with how an event handler is handled. Since events can be intercepted by handlers ...

Get Practical Web Technologies 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.