Common Events
Common Events: Non-Form Events, Form Events, Canceling Events.
Updated
- Non-Form Events (Apprentice): Any element on a page can respond to the mouse, such as a click or a press of a mouse button, so even a plain div or table row can react to the user.
- Form Events (Apprentice): Form controls send their own events, for the moments a visitor types, changes a value, moves between fields or sends the form, so you can pick the one that fires exactly when you need it.
- Canceling Events (Journeyman): A handler can cancel what the browser would do next, such as sending a form that failed validation, by calling preventDefault() on the event object the browser passes in.