This article mainly gives a detailed summary of the event object attributes and methods in jquery. If you need them, you can refer to them and hope to help you with JQuery Reading Notes-Event attributes.
The Event attribute in JQuery events is often ignored. You don't really use it most of the time, but sometimes it still works. If you know the user's environment at the time of triggering (whether shift etc is pressed ). Each browser has a different place for event. Jquery standardizes the Event so you can use it with confidence.
*. Target: the DOM object that triggers the event. When the event is bubbling, you can determine whether it is the event source (compare event.tar get to this)
*. PageX: left attribute of the mouse, relative to page
*. PageY: top attribute of the mouse, relative to the page
* PreventDefault (): if this method is called, the original event is ignored. (For example, clicked link will not go to the new Url)
* StopPropagation (): enables Jquery to stop event bubbling.
*. Data: if the event contains EventData, you can use this attribute to obtain Eventdata.
* CtrlKey: Type: Boolean; Description: whether to press Ctrl
* ShiftKey: Type: Boolean, indicating whether the Shift key is pressed
* AltKey: Type: Boolean; Description: whether the Alt key is pressed
* CharCode: Type: Number; Description: The charCode value of the last response keyboard button
* KeyCode: Type: Number; Description: the keyCode value of the last response keyboard button
* Button: Type: Number; Description: The mouse key pressed; left-click: 1; right-click: 2; middle-click: 4
* Which: Type: Number, indicating which button is the last response. If it is a keyboard button, it is equal to charCode | keyCode. If it is a mouse button, the left button: 1, right-click: 3, key 2
Type: Event type
RelatedTarget: indicates the DOM elements that exit or enter when a mouse event is triggered.
CurrentTarget: the DOM object of the currently triggered event before the bubble, which is equivalent to this.
Result: The value returned by the previous event processing function.
ScreenX/Y: for mouse events, obtain the horizontal/vertical coordinates of the event relative to the screen origin.