Event in JavaScript
Advertisements
Event in JavaScript
All objects have properties and methods. In addition, some objects also have "events". Events are things that happen, usually user actions, that are associated with an object. The "event handler" is a command that is used to specify actions in response to an event. Below are some of the most common events:
Event | Discription |
---|---|
onLoad | Occurs when a page loads in a browser |
onUnload | occurs just before the user exits a page |
onMouseOver | occurs when you point to an object |
onMouseOut | occurs when you point away from an object |
onSubmit | occurs when you submit a form |
onClick | occurs when an object is clicked |
Events and Objects
Events are things that happen, actions, that are associated with an object. Below are some common events and the object they are associaated with:
Event | Object |
---|---|
onLoad | Body |
onUnload | Body |
onMouseOver | Link, Button |
onMouseOut | Link, Button |
onSubmit | Form |
onClick | Button, Checkbox, Submit, Reset, Link |
Google Advertisment