5 points

Javascript Events

Last update Aug 13, 2009

IDEventWhat it does?
1.onload// Applied when a page has been loaded
2.onunload// Applied when a page has been unloaded e.x. a link is pressed, the tab is closed
3.onresize// Applied when the browser's size is changed
4.onerror// Applied when an error occurs
5.onfocus// Applied when an object gets focus e.x. a text form is pressed
6.onblur// Applied when an object loses focus, reverse onfocus
7.onchange// Applied when the content of a field is changed
8.onclick// Applied when an object gets clicked
9.ondbclick// Applied when an object gets double clicked
10.onkeypress// Applied when a keyboard key is pressed or held down
11.onkeydown// Applied when a keyboard key is pressed
12.onkeyup// Applied when a keyboard key is released
13.onmousedown// Applied when a mouse button is released
14.onmouseup// Applied when a mouse button is clicked
15.onmouseover// Applied when the mouse pointer moves over a specified object
16.onmouseout// Applied when the mouse pointer moves away from a specified object
17.onmousemove// Applied when the mouse pointer is moved
18.onselect// Applied when text is selected in a text or textarea field or an option is selected
19.onsubmit// Applied when the submit button in a form is clicked
20.onscroll// Applied when the window is scrolled up or down
21.onbeforeunload// Applied when the page is about to be unloaded
21.onerror// Applied when an error occurs loading a document or an image