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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access