Telerik blogs

Below is a table of the most common client side events in JavaScript. The Table is divided into three columns – the first lists the name of the event. The second contains a short description of the event, and the third lists all page objects, which support the given event.                                         

Event Name                Description  Supported by objects

 onabort

The onabort event occurs when loading of an image is aborted.

image

onblur

The onblur event occurs when an object loses focus.

button, checkbox, fileUpload, layer, frame, password, radio, reset, submit, text, textarea, window

onchange

The onchange event occurs when the content of a field changes.

fileUpload, select, text, textarea

onclick

The onclick event occurs when an object gets clicked.

button, document, checkbox, link, radio, reset, submit

ondblclick

The ondblclick event occurs when an object gets double-clicked.

document, link

onerror

The onerror event is triggered when an error occurs loading a document or an image.

window, image

onfocus

The onfocus event occurs when an object gets focus.

button, checkbox, fileUpload, layer, frame, password, radio, reset, select, submit, text, textarea, window

onkeydown

The onkeydown event occurs when a keyboard key is pressed.

 

document, image, link, textarea

onkeypress

The onkeydown event occurs when a keyboard key is pressed or held down.

document, image, link, textarea

onkeyup

The onkeyup event occurs when a keyboard key is released.

document, image, link, textarea

onload

The onload event occurs immediately after a page or an image is loaded.

image, layer, window

onmousedown

The onmousedown event occurs when a mouse button is clicked.

button, document, link

onmousemove

The onmousemove event occurs when the mouse pointer is moved.

 

onmousemove is, by default, not an event of any object, because mouse movement happens very frequently.

onmouseout

The onmouseout event occurs when the mouse pointer moves away from a specified object.

layer, link

onmouseover

The onmouseover event occurs when the mouse pointer moves over a specified object.

layer, link

onmouseup

The onmouseup event occurs when a mouse button is released.

button, document, link

onreset

The onreset event occurs when the reset button in a form is clicked.

Form

onresize

The onresize event occurs when a window or frame is resized.

Window

onselect

The onselect event occurs when text is selected in a text or textarea field.

text, textarea

onsubmit

The onsubmit event occurs when the submit button in a form is clicked.

Form

onunload

The onunload event occurs when a user exits a page.

 

window


About the Author

Iana Tsolova

is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

Comments

Comments are disabled in preview mode.