132, JavaScript event summary

Source: https: //www.runoob.com/jsref/dom-obj-event.html
First, the mouse events
1, onclick: event when the user clicks on an object called a handle.
2, oncontextmenu: triggered when the user clicks the right mouse button to open the context menu.
3, ondblclick: event handler when the user double-clicks an object called.
4, onmousedown: mouse button is pressed.
5, onmouseenter: Fires when the mouse pointer is moved over the element.
6, onmouseleave: Fires when the mouse pointer out of the element.
7, onmousemove: the mouse is moved.
8, onmouseover: mouse over an element.
9, onmouseout: mouse away from an element.
10, onmouseup: the mouse button is released.
Second, keyboard events
1, onkeydown: a keyboard key is pressed.
2, onkeypress: a keyboard key is pressed and released.
3, onkeyup: A keyboard key is released.
Third, the framework / object (Frame / Object) events
1, onabort: loaded image is interrupted.
2, onbeforeunload: This event fires when leaving the page (refresh on or off).
3, onerror: An error occurred while loading a document or image. .
4, onhashchange: This event is triggered when the anchor portion of the URL of the current modification occurs.
5, onload: a page or an image has finished loading.
6, onpageshow: This event is triggered when the user accesses the page.
7, onpagehide: In the event a user leaves the current page trigger a jump to another page.
8, onresize: window or frame is resized.
9, onscroll: When the document is scrolled event occurred.
10, onunload: user exits the page.
Third, form events
1, onblur: Fires when the element loses focus.
2, onchange: This event is triggered when the contents of the form elements change
3, onfocus: Fires when the element gets focus.
4, onfocusin: Fires when the element is about to get focus.
5, onfocusout: Fires when the element is about to lose focus.
6, oninput: trigger element gets user input.
7, onreset: trigger reset the form.
8, onsearch: user triggers the search field to enter text.
9, onselect: triggered when the user selects text.
10, onsubmit: Triggered when the form is submitted.
Fourth, clipboard events
1, oncopy: This event is triggered when a user copies the element content.
2, oncut: This event is triggered when the user shear element content.
3, onpaste: This event is triggered when the user paste the element content.
Fifth, the print event
1, onafterprint: This event has already started printing the page, or triggered when the Print window has closed.
2, onbeforeprint: This event is triggered when a page is about to begin printing.
Sixth, drag events
1, ondrag: This event is triggered when the element is being dragged.
2, ondragend: Drag the trigger event complete the element of the user.
3, ondragenter: This event is triggered when dragged element into the drop target.
4, ondragleave: This event is triggered when the drag element is placed away from the goal.
5, ondragover: This event is triggered when the drag element on the drop target.
6, ondragstart: This event is triggered when the user starts dragging elements.
7, ondrop: This event fires when the drag element placed in the target area.
Seven, multimedia (Media) event
1, onabort: triggering event in the video / audio (audio / video) terminate loaded.
Triggering event in user can start playing video / audio (audio / video): 2, oncanplay.
3, oncanplaythrough: the event is still playable video / audio (audio / video) and the trigger without having to pause and buffering.
4, ondurationchange: triggering event duration in video / audio (audio / video) changes.
5, onemptied: triggering the current playlist is empty.
6, onended: event trigger at the end of play in the video / audio (audio / video).
7, onerror: events in video / audio (audio / video) data is triggered when an error occurs during loading.
8, onloadeddata: Event to load the video / audio (audio / video) in a browser firing trigger when the current frame.
9, onloadedmetadata: metadata events in the specified video / audio (audio / video) triggered after loading.
10, onloadstart: event in the browser to start looking specified video / audio (audio / video) trigger.
11, onpause: triggering event in the video / audio (audio / video) Pause.
12, onplay: triggering event to start playing the video / audio (audio / video).
13, onplaying: Event pause in video / audio (audio / video) or after re-trigger buffer ready to start playing.
14, onprogress: triggering event specified in the browser to download video / audio (audio / video).
15, onratechange: trigger event when sending change the playback speed of video / audio (audio / video) is.
After repositioning the trigger event video / audio (audio / video) in the user's playback position: 16, onseeked.
When an event triggers the start repositioning video / audio (audio / video) users: 17, onseeking.
18, onstalled: get media event data in the browser, but triggered when the media data is not available.
19, onsuspend: event triggered when media data abort reading in the browser.
20, ontimeupdate: event triggered when the current playback position transmitter change.
21, onvolumechange: event fires when the volume is changed.
22, onwaiting: event fires when the video due to be played next frame buffer is required.
Eight, animation events
1, animationend: This event is triggered when the CSS animation is complete.
2, animationiteration: This event is triggered when the CSS animations repeat.
3, animationstart: This event is triggered when the CSS animation starts.
Nine, the transition event
1, transitionend: This event is triggered after the completion of the transition in the CSS.
X. Other events
1, onmessage: This event is triggered by either receiving a message from the object (WebSocket, Web Worker, Event Source child or parent window or frame).
2, onmousewheel: obsolete. Use onwheel event instead.
3, ononline: This event is triggered when the browser to work online.
4, onoffline: This event is triggered when the browser start work offline.
5, onpopstate: This event is triggered when browsing history (history objects) window is changed.
6, onshow: This event is triggered when the <menu> element displayed in the context menu.
7, onstorage: This event is triggered when the Web Storage (HTML 5 Web store) update.
8, ontoggle: This event is open or closed <details> element is triggered when the user.
9, onwheel: This event fires when the mouse wheel to scroll up and down in elements.
XI event object
1, Constant
(1) CAPTURING-PHASE: The current event phase for the capture phase (1).
(2) AT-TARGET: The current event is the target stage, in assessing the target event (1).
(3) BUBBLING-PHASE: The current event is a bubbling phase.
2, property
(1) bubbles: returns a Boolean value that indicates whether an event is a bubbling event type.
(2) cancelable: returns a Boolean value that indicates whether the event can hold cancel the default action.
(3) currentTarget: returns its event listener triggered element of the event.
(4) eventPhase: Returns the current stage of the event spread.
(5) target: Returns the element that triggered the event (the event target node).
(6) timeStamp: Returns the date and time of the event generated.
(7) type: Returns the name of the current event Event object represented.
3. Methods:
(1) initEvent (): Event object attributes to initialize the newly created.
(2) preventDefault (): tells the browser not to perform a default action associated with the event.
(3) stopPropagation (): no longer distribute event.
XII target event object
1, method
(1) addEventListener (): allowed to register to listen to events in the target event (IE8 = attachEvent ()).
(2) dispatchEvent (): allowed to send an event to the listener (IE8 = fireEvent ()).
(3) removeEventListener (): run once registered to listen for events on the event target (IE8 = detachEvent ()).
XIII event listener objects
1, method
(1) handleEvent (): put any object is registered as an event handler.
Fourth, the document event object
1, method
(1)createEvent()。
Fifth, mouse / keyboard event object
1, property
(1) altKey: returned when the event is triggered, "ALT" is pressed.
(2) button: return when the event is triggered, which mouse button is clicked.
(3) clientX: return when the event is triggered, the horizontal coordinates of the mouse pointer.
(4) clientY: Returns the event is triggered when the vertical coordinates of the mouse pointer.
(5) ctrlKey: returned when the event is triggered, "CTRL" key is pressed.
(6) Location: Returns the location of the key on the device.
(7) charCode: return onkeypress event trigger key value-letter code.
(8) key: Returns the key identifier when a key is pressed.
(9) keyCode: Returns the character code value onkeypress event trigger key or key code onkeyup onkeydown or events.
(10) which: Returns the character code value onkeypress event trigger key or key code onkeyup onkeydown or events.
(11) metaKey: returned when the event is triggered, "meta" key is pressed.
(12) relatedTarget: Returns the node associated with the destination node event.
(13) screenX: returns when an event is triggered, the horizontal coordinates of the mouse pointer.
(14) screenY: Returns when an event is triggered, the vertical coordinates of the mouse pointer.
(15) shiftKey: returned when the event is triggered, "SHIFT" key is pressed.
2, method
(1) initMouseEvent (): initialize the value of a mouse event object.
() (2) initKeyboardEvent: value initialization keyboard event object.

Guess you like

Origin www.cnblogs.com/gushixianqiancheng/p/11321997.html