Javascript Events

Events are actions that the user performs while visiting your site. Submitting a form or moving the mouse over an image are two examples for events.

JavaScript applies commands called Event Handlers to these events. An action of a user is recognized by an Event Handler in your script. For example, if the user clicks the button to abort loading your page, the Event Handler onAbort() will take a notice of it and perform whatever action you have assigned.

When you write a script you don’t have to define scenarios for every possible action there is. An image button will display just fine without using onMouseOver and onMouseOut. But if you want to add a little more excitement to your page’s interface, you should try it.

Event Handlers

EVENT

onAbort

onBlur

onChange

onClick

onError

onFocus

onLoad

onMouseOver

onMouseOut

onSelect

onSubmit

onUnload


WHAT IT HANDLES

User aborted page loading.

User left the object.

User changed the object.

User clicked on an object.

Script encountered an error.

User made an object active.

Object finished page loading.

Cursor moved over an object.

Cursor moved off an object.

User selected content of a page.

User submitted a form.

User left window.

Did you like this post? Get monthly summary of our new tutorials, posts and tips to your inbox!

No Responses

Post Your Comment

Your email address will not be published.