Summary of Event object properties and methods in jquery _jquery

Source: Internet
Author: User

jquery reading notes –event attribute description
Event attributes in the jquery event are frequently ignored. Most of the time you really don't use it, but sometimes it still works. For example, the user's environment (whether shift etc is pressed) is known when triggered. Each browser has a different place for the event, and jquery standardizes the event so that it is safe to use.

*. Target this response triggers the DOM object of the event, which can be used to determine whether it is the source of the event when the event bubbles (compare Event.target to this)
*. Pagex: Left property of the mouse, relative to page
*. Pagey: The top property of the mouse, relative to page
* Preventdefault (): This method is invoked, the original event is ignored. (for example, clicked Link will not go to the new URL)
* Stoppropagation (): Let jquery stop event bubbling
* . Data: If there are eventdata in the event you can use this property to get the corresponding eventdata data.
* Ctrlkey: Type: Boolean, Description: Ctrl key is pressed
* Shiftkey: Type: Boolean, Description: The SHIFT key is pressed
* Altkey: Type: Boolean, Description: Alt key is pressed
* CharCode: Type: Number, Description: The last response to the keyboard key CharCode value
* KeyCode: Type: Number, Description: The last response to the keyboard key KeyCode value
* Button: Type: Number, Description: Press the mouse button, left: 1, right key: 2, Medium key: 4
* Which: Type: number, Description: The last response is which button, if the keyboard button is equal to CharCode | | KeyCode; If is the mouse button, left: 1, right key: 3, Middle key 2

Type: Event Type
Relatedtarget: For mouse events, the DOM element
Currenttarget: A DOM object that is the current triggering event that is left or entered when the event is triggered, is equivalent to this.
Result: The value returned by the previous event handler
Screenx/y: For mouse events, gets the horizontal/vertical coordinates of the event relative to the screen origin

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.