Learn Simpli

Free Online Tutorial For Programmers, Contains a Solution For Question in Programming. Quizzes and Practice / Company / Test interview Questions.

Events in Javascript

Introduction
  1. Events are actions that happen in the system
  2. The system tells you about so you can respond to them in some way if desired
  3. For example, if the user selects a button on a webpage, you might want to respond to that action by displaying an information box
  4. Each available event has an event handler, which is a block of code
  5. Event handlers are sometimes called event listeners
Event handler
  1. Any function or object that is registered to be notified of events
  2. Event listeners can be registered with on attributes in HTML
  3. Event listeners can be registered with properties in Web APIs