①jquery two ways to declare built-in event functions
event function with no Parameters-event type name () simulates the user's action
Event function with Parameters-event type name (Event function)
$ ($ ("#id"). Click (function () {})) event function with parameters
$ ($ ("#id"). Click (function () {}), $ ("#id"). Click ();) event function without parameters-not only does the #id execute the corresponding function, but also simulates the user action
②jquery built-in event type classification
⑴ Browser-related events
Error (FN) match element triggers a function when errors occur, there is no standard error event, such as an error event that triggers an image when the image src is invalid
The load (FN) match element triggers a function after loading, such as window is triggered after all DOM objects have been loaded, and the other individual elements are triggered when a single element has finished loading
Unload (FN)
Resize (FN) triggers a function when the matching element changes size
triggered when the scroll (FN) scroll bar has changed
⑵ form-related events
Change (FN) triggers when the matching element loses focus, and also when the element has focus
Select (FN) triggers when the user selects a paragraph in a text box
Triggered when submit form is submitted (FN)
⑶ Keyboard Operation related events
KeyDown (FN) trigger when the keyboard is pressed
KeyPress (FN) the trigger sequence is keydown->keyup->keypress when the keyboard is pressed and bounced
KeyUp (FN) trigger when the keyboard bounces
⑷ Mouse Operation related events
Click (FN) Order is Mousedown->mouseup->click
MouseDown (FN)
MouseUp (FN)
DblClick (FN)
MouseOver (FN)
Mouseout (FN)
MouseMove (FN) is triggered when the match element is moved, and the event handler is passed a variable-the event object (whose Clientx,clienty attribute represents the mouse coordinates)
Article Source: Web front-end video development Daquan
Public Number: Jingfeng18
Talking about the event handling in jquery