Event Listeners
Event Listeners are how you enable an element to respond to different events. By default events bubble down the DOM tree so that a single action can trigger multiple events.
Event Listeners
- add event listener:
mySelection.addEventListener('click', foo);
Common Event Listeners
onload– when the page loadsonclick– when a user clicks somethingonmouseover– when a user mouses over somethingonfocus– when a user puts the cursor in a form fieldonblur– When a user leaves a form field
Next Article: Variables