When your users visit your website, they do things like click on things, hover over things etc. These are examples of what JavaScript calls events. Using JavaScript, you can respond to an event using Event Handlers. You can attach an event handler to the HTML element for which you want to respond to when a specific event occurs. For example, you could attach JavaScript's onMouseover event handler to a button and specify some JavaScript to run whenever this event occurs against that button.

Window Events

Form Events

Key Events

Mouse Events

Exercises :
  1. What are difference between onKeyPress, onKeyDown and onKeyUp ?
After editing Click here:
Output: