Common js event Manual

Source: Internet
Author: User

Common events without return values

Attribute Description
Onabort Image loading is interrupted.
Onblur Element loses focus.
Onchange The domain content is changed.
Onclick Event handle called when a user clicks an object.
Ondblclick The event handle that is called when you double-click an object.
Onerror An error occurred while loading the document or image.
Onfocus Element to obtain the focus.
Onkeydown A keyboard button is pressed.
Onkeypress A keyboard button is pressed and released.
Onkeyup A keyboard button is released.
Onload A page or image is loaded.
Onmousedown The mouse button is pressed.
Onmousemove The mouse is moved.
Onmouseout Move the mouse away from an element.
Onmouseover Move the cursor over an element.
Onmouseup The mouse button is released.
Onreset The reset button is clicked.
Onresize The window or frame is adjusted again.
Onselect The text is selected.
Onsubmit The confirmation button is clicked.
Onunload The user exits the page.

Returns the mouse or keyboard attributes.
Attribute Description
AltKey Returns whether or not "ALT" is pressed when the event is triggered.
Button Returns the mouse button that is clicked when an event is triggered.
ClientX Returns the horizontal coordinates of the mouse pointer when an event is triggered.
ClientY Returns the vertical coordinates of the mouse pointer when an event is triggered.
CtrlKey Returns whether the "CTRL" Key is pressed when the event is triggered.
MetaKey Returns whether the "meta" Key is pressed when the event is triggered.
RelatedTarget Return the node associated with the target node of the event.
ScreenX Returns the horizontal coordinates of the mouse pointer when an event is triggered.
ScreenY Returns the vertical coordinates of the mouse pointer when an event is triggered.
ShiftKey Returns whether the "SHIFT" Key is pressed when the event is triggered.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.