A Guide to Handling Browser Events
Sarah Chima has published a walkthrough of working with browser events in JavaScript, covering things like clicks. The piece is packed with useful material, and for anyone who doesn't consider JavaScript a strength, it stands out as one of the clearest explanations of event handling to come along in a while.
When an event occurs, the browser creates an event object and passes it as an argument to the event handler. This event object contains details of the event. For instance, you might want to know which button was clicked or which key was pressed or the mouse coordinates when the event occurred. You can get all of these from the event object.
The guide also points readers to a primer on bubbling and capturing that is well worth a look.



