Working with Events

  • Adam Freeman


I have been using events in the examples for this part of the book to respond to button clicks. In this chapter, it is time to dig into the details, explain what events really are, show you how they work, and how they fit within the rest of the DOM. In short, events allow you to define JavaScript functions that are invoked in response to a change in the state of an element, such as when the element gains and loses the focus, or when the user clicks the mouse button over the element.


Mouse Button Event Object Event Handler Focus Event Target Phase 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Adam Freeman 2011

Authors and Affiliations

  • Adam Freeman

There are no affiliations available

Personalised recommendations