IT. Expert System.

Java Script

DOM Event Object


DOM Event Object

The event object gives you information about an event that has occurred.

The Event object represents the state of an event, such as the element in which the event occurred, the state of the keyboard keys, the location of the mouse, and the state of the mouse buttons.

Event Handlers

The table below lists the attributes that can be inserted into HTML tags to define event actions.

Attribute The Event occurs when...
onblur An element loses focus
onchange The content of a field changes
onclick Mouse clicks an object
ondblclick Mouse double-clicks an object
onerror An error occurs when loading a document or an image
onfocus An element gets focus
onkeydown A keyboard key is pressed
onkeypress A keyboard key is pressed or held down
onkeyup A keyboard key is released
onmousedown A mouse button is pressed
onmousemove The mouse is moved
onmouseout The mouse is moved off an element
onmouseover The mouse is moved over an element
onmouseup A mouse button is released
onresize A window or frame is resized
onselect Text is selected
onunload The user exits the page

Mouse / Keyboard Attributes

Property Description
altKey Returns whether or not the "ALT" key was pressed when an event was triggered
button Returns which mouse button was clicked when an event was triggered
clientX Returns the horizontal coordinate of the mouse pointer when an event was triggered
clientY Returns the vertical coordinate of the mouse pointer when an event was triggered
ctrlKey Returns whether or not the "CTRL" key was pressed when an event was triggered
metaKey Returns whether or not the "meta" key was pressed when an event was triggered
relatedTarget Returns the element related to the element that triggered the event
screenX Returns the horizontal coordinate of the mouse pointer when an event was triggered
screenY Returns the vertical coordinate of the mouse pointer when an event was triggered
shiftKey Returns whether or not the "SHIFT" key was pressed when an event was triggered

Other Event Attributes

Property Description
bubbles Returns a Boolean value that indicates whether or not an event is a bubbling event
cancelable Returns a Boolean value that indicates whether or not an event can have its default action prevented
currentTarget Returns the element whose event listeners triggered the event
eventPhase Returns which phase of the event flow is currently being evaluated
target Returns the element that triggered the event
timeStamp Returns the time stamp, in milliseconds, from the epoch (system start or event trigger)
type Returns the name of the event


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 62 / 158770042. Delta: 0.00414 с