4.16 EVENT HANDLING
The concept of dynamic behavior can be achieved through a well-defined user event handling mechanism. Events refer to user actions like clicking of a button, mouse movement (up/down), change of values and on-load of a page. Each of these events can be recognized by JavaScript (though the browser), trigerring a callback that can be custom written in JavaScript.
The events happen in the objects within the DOM model as in the clicking of a button by a user. However, not all events are generated by users alone—the system also generates some events. Event handling has been one of the most challenging topics in JavaScript, since its implementation has changed over the years. Not surprisingly, its implementation is browser-dependent. ...
Get Web Technology: Theory and Practice 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.