offline version v3


211 of 264 menu

Event types in JavaScript

Mouse events

Type Description
click A mouse click was done. The event occurs after the mouse button has been released.
mousedown Mouse button pressed.
mouseup Mouse button released.
dblclick Double click.
mousemove The mouse cursor moves inside the element's display area.
mouseout The mouse cursor has moved out of the element's display area.
mouseover The mouse cursor is inside the element's display area.

Keyboard events

Type Description
keydown Keyboard button pressed.
keypress A key on the keyboard is pressed and is not released longer than the repeat interval. The duration of the repetition interval is a system parameter and depends on the settings of the user's operating system.
keyup Previously pressed button released.

Form and page element events

Type Description
change An element loses input focus, and the content of an element has changed while the element was in focus.
select Some part of the text inside the element becomes selected.
submit The "Submit" button was pressed on the form, but the form has not yet been sent to the server.

Form and page element events

Type Description
blur An element loses input focus, i.e. cursor jumps to another element.
focus The displayable has received input focus. For text fields, this event indicates that the cursor is already in the given element.
load Page loading completed.
unload Exiting the document (closing or redirecting a page to a different URL).
scroll Fires when an element is scrolled.
enru