GlobalEventHandlers

GlobalEventHandlers mixin describes the event handlers common to several interfaces like HTMLElement , Document ,或 Window . Each of these interfaces can, of course, add more event handlers in addition to the ones listed below.

注意 : GlobalEventHandlers is a mixin and not an interface; you can't actually create an object of type GlobalEventHandlers .

特性

This interface doesn't include any properties except for the event handlers listed below.

事件处理程序

These event handlers are defined on the GlobalEventHandlers mixin, and implemented by HTMLElement , Document , Window , as well as by WorkerGlobalScope for Web Workers.

GlobalEventHandlers.onabort
Is an EventHandler representing the code to be called when the abort event is raised.
GlobalEventHandlers.onanimationcancel
An EventHandler called when an animationcancel event is sent, indicating that a running CSS animation has been canceled.
GlobalEventHandlers.onanimationend
An EventHandler called when an animationend event is sent, indicating that a CSS animation has stopped playing.
GlobalEventHandlers.onanimationiteration
An EventHandler called when an animationiteration event has been sent, indicating that a CSS animation has begun playing a new iteration of the animation sequence.
GlobalEventHandlers.onanimationstart
An EventHandler called when an animationstart event is sent, indicating that a CSS animation has started playing.
GlobalEventHandlers.onauxclick
An EventHandler called when an auxclick event is sent, indicating that a non-primary button has been pressed on an input device (e.g. a middle mouse button).
GlobalEventHandlers.onblur
Is an EventHandler representing the code to be called when the blur event is raised.
GlobalEventHandlers.onerror
Is an OnErrorEventHandler representing the code to be called when the error event is raised.
GlobalEventHandlers.onfocus
Is an EventHandler representing the code to be called when the focus event is raised.
GlobalEventHandlers.oncancel
Is an EventHandler representing the code to be called when the cancel event is raised.
GlobalEventHandlers.oncanplay
Is an EventHandler representing the code to be called when the canplay event is raised.
GlobalEventHandlers.oncanplaythrough
Is an EventHandler representing the code to be called when the canplaythrough event is raised.
GlobalEventHandlers.onchange
Is an EventHandler representing the code to be called when the change event is raised.
GlobalEventHandlers.onclick
Is an EventHandler representing the code to be called when the click event is raised.
GlobalEventHandlers.onclose
Is an EventHandler representing the code to be called when the close event is raised.
GlobalEventHandlers.oncontextmenu
Is an EventHandler representing the code to be called when the contextmenu event is raised.
GlobalEventHandlers.oncuechange
Is an EventHandler representing the code to be called when the cuechange event is raised.
GlobalEventHandlers.ondblclick
Is an EventHandler representing the code to be called when the dblclick event is raised.
GlobalEventHandlers.ondrag
Is an EventHandler representing the code to be called when the drag event is raised.
GlobalEventHandlers.ondragend
Is an EventHandler representing the code to be called when the dragend event is raised.
GlobalEventHandlers.ondragenter
Is an EventHandler representing the code to be called when the dragenter event is raised.
GlobalEventHandlers.ondragexit
Is an EventHandler representing the code to be called when the dragexit event is raised.
GlobalEventHandlers.ondragleave
Is an EventHandler representing the code to be called when the dragleave event is raised.
GlobalEventHandlers.ondragover
Is an EventHandler representing the code to be called when the dragover event is raised.
GlobalEventHandlers.ondragstart
Is an EventHandler representing the code to be called when the dragstart event is raised.
GlobalEventHandlers.ondrop
Is an EventHandler representing the code to be called when the drop event is raised.
GlobalEventHandlers.ondurationchange
Is an EventHandler representing the code to be called when the durationchange event is raised.
GlobalEventHandlers.onemptied
Is an EventHandler representing the code to be called when the emptied event is raised.
GlobalEventHandlers.onended
Is an EventHandler representing the code to be called when the ended event is raised.
GlobalEventHandlers.onformdata
Is an EventHandler for processing formdata events, fired after the entry list representing the form's data is constructed.
GlobalEventHandlers.ongotpointercapture
Is an EventHandler representing the code to be called when the gotpointercapture event type is raised.
GlobalEventHandlers.oninput
Is an EventHandler representing the code to be called when the input event is raised.
GlobalEventHandlers.oninvalid
Is an EventHandler representing the code to be called when the invalid event is raised.
GlobalEventHandlers.onkeydown
Is an EventHandler representing the code to be called when the keydown event is raised.
GlobalEventHandlers.onkeypress
Is an EventHandler representing the code to be called when the keypress event is raised.
GlobalEventHandlers.onkeyup
Is an EventHandler representing the code to be called when the keyup event is raised.
GlobalEventHandlers.onload
Is an EventHandler representing the code to be called when the load event is raised.
GlobalEventHandlers.onloadeddata
Is an EventHandler representing the code to be called when the loadeddata event is raised.
GlobalEventHandlers.onloadedmetadata
Is an EventHandler representing the code to be called when the loadedmetadata event is raised.
GlobalEventHandlers.onloadend
Is an EventHandler representing the code to be called when the loadend event is raised (when progress has stopped on the loading of a resource.)
GlobalEventHandlers.onloadstart
Is an EventHandler representing the code to be called when the loadstart event is raised (when progress has begun on the loading of a resource.)
GlobalEventHandlers.onlostpointercapture
Is an EventHandler representing the code to be called when the lostpointercapture event type is raised.
GlobalEventHandlers.onmousedown
Is an EventHandler representing the code to be called when the mousedown event is raised.
GlobalEventHandlers.onmouseenter
Is an EventHandler representing the code to be called when the mouseenter event is raised.
GlobalEventHandlers.onmouseleave
Is an EventHandler representing the code to be called when the mouseleave event is raised.
GlobalEventHandlers.onmousemove
Is an EventHandler representing the code to be called when the mousemove event is raised.
GlobalEventHandlers.onmouseout
Is an EventHandler representing the code to be called when the mouseout event is raised.
GlobalEventHandlers.onmouseover
Is an EventHandler representing the code to be called when the mouseover event is raised.
GlobalEventHandlers.onmouseup
Is an EventHandler representing the code to be called when the mouseup event is raised.
GlobalEventHandlers.onmousewheel
Is an EventHandler representing the code to be called when the mousewheel event is raised. Deprecated. Use onwheel 代替。
GlobalEventHandlers.onwheel
Is an EventHandler representing the code to be called when the wheel event is raised.
GlobalEventHandlers.onpause
Is an EventHandler representing the code to be called when the pause event is raised.
GlobalEventHandlers.onplay
Is an EventHandler representing the code to be called when the play event is raised.
GlobalEventHandlers.onplaying
Is an EventHandler representing the code to be called when the playing event is raised.
GlobalEventHandlers.onpointerdown
Is an EventHandler representing the code to be called when the pointerdown event is raised.
GlobalEventHandlers.onpointermove
Is an EventHandler representing the code to be called when the pointermove event is raised.
GlobalEventHandlers.onpointerup
Is an EventHandler representing the code to be called when the pointerup event is raised.
GlobalEventHandlers.onpointercancel
Is an EventHandler representing the code to be called when the pointercancel event is raised.
GlobalEventHandlers.onpointerover
Is an EventHandler representing the code to be called when the pointerover event is raised.
GlobalEventHandlers.onpointerout
Is an EventHandler representing the code to be called when the pointerout event is raised.
GlobalEventHandlers.onpointerenter
Is an EventHandler representing the code to be called when the pointerenter event is raised.
GlobalEventHandlers.onpointerleave
Is an EventHandler representing the code to be called when the pointerleave event is raised.
GlobalEventHandlers.onpointerlockchange
Is an EventHandler representing the code to be called when the pointerlockchange event is raised.
GlobalEventHandlers.onpointerlockerror
Is an EventHandler representing the code to be called when the pointerlockerror event is raised.
GlobalEventHandlers.onprogress
Is an EventHandler representing the code to be called when the progress event is raised.
GlobalEventHandlers.onratechange
Is an EventHandler representing the code to be called when the ratechange event is raised.
GlobalEventHandlers.onreset
Is an EventHandler representing the code to be called when the reset event is raised.
GlobalEventHandlers.onresize
Is an EventHandler representing the code to be called when the resize event is raised.
GlobalEventHandlers.onscroll
Is an EventHandler representing the code to be called when the scroll event is raised.
GlobalEventHandlers.onseeked
Is an EventHandler representing the code to be called when the seeked event is raised.
GlobalEventHandlers.onseeking
Is an EventHandler representing the code to be called when the seeking event is raised.
GlobalEventHandlers.onselect
Is an EventHandler representing the code to be called when the select event is raised.
GlobalEventHandlers.onselectstart
Is an EventHandler representing the code to be called when the selectionchange event is raised, i.e. when the user starts to make a new text selection on a web page.
GlobalEventHandlers.onselectionchange
Is an EventHandler representing the code to be called when the selectionchange event is raised, i.e. when the text selected on a web page changes.
GlobalEventHandlers.onshow
Is an EventHandler representing the code to be called when the show event is raised.
GlobalEventHandlers.onsort
Is an EventHandler representing the code to be called when the sort event is raised.
GlobalEventHandlers.onstalled
Is an EventHandler representing the code to be called when the stalled event is raised.
GlobalEventHandlers.onsubmit
Is an EventHandler representing the code to be called when the submit event is raised.
GlobalEventHandlers.onsuspend
Is an EventHandler representing the code to be called when the suspend event is raised.
GlobalEventHandlers.ontimeupdate
Is an EventHandler representing the code to be called when the timeupdate event is raised.
GlobalEventHandlers.onvolumechange
Is an EventHandler representing the code to be called when the volumechange event is raised.
GlobalEventHandlers.ontouchcancel
Is an EventHandler representing the code to be called when the touchcancel event is raised.
GlobalEventHandlers.ontouchend
Is an EventHandler representing the code to be called when the touchend event is raised.
GlobalEventHandlers.ontouchmove
Is an EventHandler representing the code to be called when the touchmove event is raised.
GlobalEventHandlers.ontouchstart
Is an EventHandler representing the code to be called when the touchstart event is raised.
GlobalEventHandlers.ontransitioncancel
An EventHandler called when a transitioncancel event is sent, indicating that a CSS transition has been cancelled.
GlobalEventHandlers.ontransitionend
An EventHandler called when a transitionend event is sent, indicating that a CSS transition has finished playing.
GlobalEventHandlers.ontransitionrun
An EventHandler called when a transitionrun event is sent, indicating that a CSS transition is running, though not nessarilty started.
GlobalEventHandlers.ontransitionstart
An EventHandler called when a transitionstart event is sent, indicating that a CSS transition has started transitioning.
GlobalEventHandlers.onwaiting
Is an EventHandler representing the code to be called when the waiting event is raised.

方法

This interface defines no methods.

规范

规范 状态 Comment
Selection API
The definition of 'Extension to GlobalEventHandlers' in that specification.
工作草案 添加 onselectionchange.
Pointer Lock
The definition of 'Extension of Document' in that specification.
候选推荐 添加 onpointerlockchange and onpointerlockerror on Document . It is experimentally implemented on GlobalEventHandlers .
HTML Living Standard
The definition of 'GlobalEventHandlers' in that specification.
实时标准 No change since the latest snapshot, HTML 5.1 .
HTML 5.1
The definition of 'GlobalEventHandlers' in that specification.
Recommendation Snapshot of HTML Living Standard . Added onsort since the HTML5 snapshot.
HTML5
The definition of 'GlobalEventHandlers' in that specification.
Recommendation Snapshot of HTML Living Standard . Creation of GlobalEventHandlers (properties where on the target before it).

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
GlobalEventHandlers Chrome 1 Edge 12 Firefox 1 IE Yes Opera Yes Safari Yes WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
onabort Chrome Yes Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Yes
onanimationcancel Chrome 不支持 No Edge 不支持 No Firefox 54 IE ? Opera ? Safari 13.1
13.1
部分支持 12
注意事项
The event handler is exposed but will not actually be called unless both the "Web Animations" and "CSS Animations via Web Animations" preferences are enabled.
WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 54 Opera Android ? Safari iOS 13.4
13.4
部分支持 12
注意事项
The event handler is exposed but will not actually be called unless both the "Web Animations" and "CSS Animations via Web Animations" preferences are enabled.
Samsung Internet Android 不支持 No
onanimationend Chrome Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationend
Edge ≤79
≤79
≤79
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationend
Firefox Yes IE ? Opera ? Safari 9 WebView Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationend
Chrome Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationend
Firefox Android Yes Opera Android ? Safari iOS 9 Samsung Internet Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationend
onanimationiteration Chrome Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationiteration
Edge ≤79
≤79
≤79
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationiteration
Firefox 51 IE ? Opera ? Safari 9 WebView Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationiteration
Chrome Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationiteration
Firefox Android 51 Opera Android ? Safari iOS 9 Samsung Internet Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationiteration
onanimationstart Chrome Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationstart
Edge ≤79
≤79
≤79
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationstart
Firefox 51 IE ? Opera ? Safari 9 WebView Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationstart
Chrome Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationstart
Firefox Android 51 Opera Android ? Safari iOS 9 Samsung Internet Android Yes
Yes
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkitanimationstart
onauxclick Chrome 55 Edge 79 Firefox 53 IE 不支持 No Opera Yes Safari 不支持 No WebView Android Yes Chrome Android Yes Firefox Android 53 Opera Android Yes Safari iOS 不支持 No Samsung Internet Android Yes
onblur Chrome Yes Edge 12 Firefox Yes IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
oncancel Chrome Yes Edge ≤79 Firefox 不支持 No IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 不支持 No Opera Android ? Safari iOS ? Samsung Internet Android Yes
oncanplay Chrome Yes Edge ≤79 Firefox Yes IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android ? Safari iOS ? Samsung Internet Android Yes
oncanplaythrough Chrome Yes Edge ≤79 Firefox Yes IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android ? Safari iOS ? Samsung Internet Android Yes
onchange Chrome 1 Edge 12 Firefox 1 IE 9 Opera 9 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
onclick Chrome 1 Edge 12 Firefox 1 IE 9 Opera 9 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
onclose Chrome Yes Edge ≤79 Firefox Yes IE ? Opera ? Safari 不支持 No WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android ? Safari iOS 不支持 No Samsung Internet Android Yes
oncontextmenu Chrome Yes Edge ≤18 Firefox Yes IE ? Opera ? Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 不支持 No
oncuechange Chrome Yes Edge ≤79 Firefox 68
注意事项
68
注意事项
Added for the <track> element ( HTMLTrackElement ) in Firefox 68.
31
注意事项
Added for the TextTrack interface in Firefox 31.
IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 68
注意事项
68
注意事项
Added for the <track> element ( HTMLTrackElement ) in Firefox 68.
31
注意事项
Added for the TextTrack interface in Firefox 31.
Opera Android ? Safari iOS ? Samsung Internet Android Yes
ondblclick Chrome Yes Edge ≤18 Firefox Yes IE ? Opera ? Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 不支持 No
ondrag Chrome 4 Edge 12 Firefox 3.5 IE 10 Opera 12 Safari 3.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
ondragend Chrome 4 Edge 12 Firefox 3.5 IE 10 Opera 12 Safari 3.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
ondragenter Chrome 4 Edge 12 Firefox 3.5 IE 10 Opera 12 Safari 3.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
ondragexit Chrome 不支持 No Edge 不支持 12 — 79 Firefox 3.5 IE 10 Opera 12 Safari 3.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
ondragleave Chrome 4 Edge 12 Firefox 3.5 IE 10 Opera 12 Safari 3.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
ondragover Chrome 4 Edge 12 Firefox 3.5 IE 10 Opera 12 Safari 3.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
ondragstart Chrome 4 Edge 12 Firefox 3.5 IE 10 Opera 12 Safari 3.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
ondrop Chrome 4 Edge 12 Firefox 3.5 IE 10 Opera 12 Safari 3.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
ondurationchange Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onemptied Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onended Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onerror Chrome 10 Edge 12 Firefox 1 IE 9 Opera 11.6 Safari 6 WebView Android ≤37 Chrome Android 18 Firefox Android 4 Opera Android 12 Safari iOS 6 Samsung Internet Android 1.0
onfocus Chrome Yes Edge 12 Firefox Yes IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
onformdata Chrome 77 Edge 79 Firefox 72 IE 不支持 No Opera 64 Safari 不支持 No WebView Android 77 Chrome Android 77 Firefox Android 不支持 No Opera Android 55 Safari iOS 不支持 No Samsung Internet Android 不支持 No
ongotpointercapture Chrome 57 Edge ≤79 Firefox 59 IE ? Opera 44 Safari ? WebView Android 57 Chrome Android 57 Firefox Android 不支持 No Opera Android 43 Safari iOS ? Samsung Internet Android 7.0
oninput Chrome Yes Edge 12 Firefox 2 IE 9 Opera 10 Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
oninvalid Chrome Yes Edge ≤79 Firefox Yes IE ? Opera Yes Safari ? WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS ? Samsung Internet Android Yes
onkeydown Chrome Yes Edge ≤18 Firefox Yes IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android ? Safari iOS ? Samsung Internet Android Yes
onkeypress Chrome Yes Edge ≤18 Firefox Yes IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android ? Safari iOS ? Samsung Internet Android Yes
onkeyup Chrome Yes Edge ≤18 Firefox Yes IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android ? Safari iOS ? Samsung Internet Android Yes
onload Chrome 1 Edge 12 Firefox 1 IE 9 Opera 9 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
onloadeddata Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onloadedmetadata Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onloadend Chrome 不支持 No Edge 不支持 No Firefox 52 IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 52 Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
onloadstart Chrome Yes
注意事项
Yes
注意事项
loadstart event is not fired on <img> elements.
Edge 12 Firefox 52 IE Yes Opera Yes
注意事项
Yes
注意事项
loadstart event is not fired on <img> elements.
Safari Yes
注意事项
Yes
注意事项
loadstart event is not fired on <img> elements.
WebView Android Yes
注意事项
Yes
注意事项
loadstart event is not fired on <img> elements.
Chrome Android Yes
注意事项
Yes
注意事项
loadstart event is not fired on <img> elements.
Firefox Android 52 Opera Android Yes
注意事项
Yes
注意事项
loadstart event is not fired on <img> elements.
Safari iOS Yes
注意事项
Yes
注意事项
loadstart event is not fired on <img> elements.
Samsung Internet Android Yes
注意事项
Yes
注意事项
loadstart event is not fired on <img> elements.
onlostpointercapture Chrome 57 Edge ≤79 Firefox 59 IE ? Opera 44 Safari ? WebView Android 57 Chrome Android 57 Firefox Android 不支持 No Opera Android 43 Safari iOS ? Samsung Internet Android 7.0
onmousedown Chrome Yes Edge 12 Firefox Yes IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
onmouseenter Chrome 30 Edge 12 Firefox 10 IE 5.5 Opera 17 Safari Yes WebView Android Yes Chrome Android Yes Firefox Android 10 Opera Android 18 Safari iOS Yes Samsung Internet Android Yes
onmouseleave Chrome 30 Edge 12 Firefox 10 IE 5.5 Opera 17 Safari Yes WebView Android Yes Chrome Android Yes Firefox Android 10 Opera Android 18 Safari iOS Yes Samsung Internet Android Yes
onmousemove Chrome Yes Edge 12 Firefox Yes IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
onmouseout Chrome Yes Edge 12 Firefox Yes IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
onmouseover Chrome Yes Edge 12 Firefox Yes IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
onmouseup Chrome Yes Edge 12 Firefox Yes IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
onmousewheel
弃用 非标
Chrome Yes Edge ≤79 Firefox 不支持 No IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 不支持 No Opera Android ? Safari iOS ? Samsung Internet Android Yes
onpause Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onplay Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onplaying Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onpointercancel Chrome 55 Edge 12
12
12 — 79
Alternate Name
Alternate Name Uses the non-standard name: onmspointercancel
Firefox 59
59
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 11
11
10
Alternate Name
Alternate Name Uses the non-standard name: onmspointercancel
Opera ? Safari 不支持 No WebView Android 55 Chrome Android 55 Firefox Android 29
Disabled
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS 不支持 No Samsung Internet Android 6.0
onpointerdown Chrome 55 Edge 12
12
12 — 79
Alternate Name
Alternate Name Uses the non-standard name: onmspointerdown
Firefox 59
59
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 11
11
10
Alternate Name
Alternate Name Uses the non-standard name: onmspointerdown
Opera ? Safari 不支持 No WebView Android 55 Chrome Android 55 Firefox Android 29
Disabled
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS 不支持 No Samsung Internet Android 6.0
onpointerenter Chrome 55 Edge 12
12
12 — 79
Alternate Name
Alternate Name Uses the non-standard name: onmspointerenter
Firefox 59
59
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 11
11
10
Alternate Name
Alternate Name Uses the non-standard name: onmspointerenter
Opera ? Safari 不支持 No WebView Android 55 Chrome Android 55 Firefox Android 29
Disabled
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS 不支持 No Samsung Internet Android 6.0
onpointerleave Chrome 55 Edge 12
12
12 — 79
Alternate Name
Alternate Name Uses the non-standard name: onmspointerleave
Firefox 59
59
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 11
11
10
Alternate Name
Alternate Name Uses the non-standard name: onmspointerleave
Opera ? Safari 不支持 No WebView Android 55 Chrome Android 55 Firefox Android 29
Disabled
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS 不支持 No Samsung Internet Android 6.0
onpointerlockchange
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
onpointerlockerror
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
onpointermove Chrome 55 Edge 12
12
12 — 79
Alternate Name
Alternate Name Uses the non-standard name: onmspointermove
Firefox 59
59
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 11
11
10
Alternate Name
Alternate Name Uses the non-standard name: onmspointermove
Opera ? Safari 不支持 No WebView Android 55 Chrome Android 55 Firefox Android 29
Disabled
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS 不支持 No Samsung Internet Android 6.0
onpointerout Chrome 55 Edge 12
12
12 — 79
Alternate Name
Alternate Name Uses the non-standard name: onmspointerout
Firefox 59
59
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 11
11
10
Alternate Name
Alternate Name Uses the non-standard name: onmspointerout
Opera ? Safari 不支持 No WebView Android 55 Chrome Android 55 Firefox Android 29
Disabled
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS 不支持 No Samsung Internet Android 6.0
onpointerover Chrome 55 Edge 12
12
12 — 79
Alternate Name
Alternate Name Uses the non-standard name: onmspointerover
Firefox 59
59
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 11
11
10
Alternate Name
Alternate Name Uses the non-standard name: onmspointerover
Opera ? Safari 不支持 No WebView Android 55 Chrome Android 55 Firefox Android 29
Disabled
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS 不支持 No Samsung Internet Android 6.0
onpointerup Chrome 55 Edge 12
12
12 — 79
Alternate Name
Alternate Name Uses the non-standard name: onmspointerup
Firefox 59
59
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 11
11
10
Alternate Name
Alternate Name Uses the non-standard name: onmspointerup
Opera ? Safari 不支持 No WebView Android 55 Chrome Android 55 Firefox Android 29
Disabled
29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS 不支持 No Samsung Internet Android 6.0
onprogress
Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onratechange Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onreset Chrome Yes Edge ≤18 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
onresize Chrome 45 Edge 12 Firefox Yes IE Yes Opera 32 Safari Yes WebView Android 45 Chrome Android 45 Firefox Android Yes Opera Android 32 Safari iOS Yes Samsung Internet Android 5.0
onscroll Chrome Yes Edge ≤18 Firefox Yes IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android ? Safari iOS ? Samsung Internet Android Yes
onseeked Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onseeking Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onselect Chrome Yes Edge ≤18 Firefox Yes IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android ? Safari iOS ? Samsung Internet Android Yes
onselectionchange
Chrome 12 Edge 12 Firefox 52
52
43
Disabled
Disabled From version 43: this feature is behind the dom.select_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE Yes Opera 15 Safari 1.3 WebView Android Yes Chrome Android 18 Firefox Android 52
52
43
Disabled
Disabled From version 43: this feature is behind the dom.select_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 14 Safari iOS Yes Samsung Internet Android Yes
onselectstart
Chrome Yes Edge 12 Firefox 52
52
43
Disabled
Disabled From version 43: this feature is behind the dom.select_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE Yes Opera ? Safari 1.3 WebView Android Yes Chrome Android Yes Firefox Android 52
52
43
Disabled
Disabled From version 43: this feature is behind the dom.select_events.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS Yes Samsung Internet Android Yes
onshow Chrome 不支持 No Edge 不支持 No Firefox Yes IE ? Opera ? Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android Yes Opera Android ? Safari iOS ? Samsung Internet Android 不支持 No
onsort
Chrome 不支持 No Edge 不支持 No Firefox 不支持 No IE ? Opera ? Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android ? Safari iOS ? Samsung Internet Android 不支持 No
onstalled Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onsubmit Chrome Yes Edge 12 Firefox Yes IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
onsuspend Chrome Yes Edge ≤79 Firefox 3.6 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
ontimeupdate Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
ontouchcancel
Chrome 18 Edge ≤79 Firefox 不支持 ? — 67 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Yes
ontouchend
Chrome 18 Edge ≤79 Firefox 不支持 ? — 67 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Yes
ontouchmove
Chrome 18 Edge ≤79 Firefox 不支持 ? — 67 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Yes
ontouchstart
Chrome 18 Edge ≤79 Firefox 不支持 ? — 67 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Yes
ontransitioncancel Chrome 不支持 No Edge 不支持 No Firefox 53 IE ? Opera ? Safari 13.1
13.1
部分支持 12
注意事项
The event handler is exposed but will not actually be called unless both the "Web Animations" and "CSS Animations via Web Animations" preferences are enabled.
WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 53 Opera Android ? Safari iOS 13.4
13.4
部分支持 12
注意事项
The event handler is exposed but will not actually be called unless both the "Web Animations" and "CSS Animations via Web Animations" preferences are enabled.
Samsung Internet Android 不支持 No
ontransitionend Chrome Yes
Alternate Name
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkittransitionend
Edge ≤79
Alternate Name
≤79
Alternate Name
Alternate Name Uses the non-standard name: onwebkittransitionend
Firefox 51 IE ? Opera ? Safari Yes WebView Android Yes
Alternate Name
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkittransitionend
Chrome Android Yes
Alternate Name
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkittransitionend
Firefox Android 51 Opera Android ? Safari iOS Yes Samsung Internet Android Yes
Alternate Name
Yes
Alternate Name
Alternate Name Uses the non-standard name: onwebkittransitionend
ontransitionrun Chrome 不支持 No Edge 不支持 No Firefox 53 IE ? Opera ? Safari 13.1
13.1
部分支持 12
注意事项
The event handler is exposed but will not actually be called unless both the "Web Animations" and "CSS Animations via Web Animations" preferences are enabled.
WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 53 Opera Android ? Safari iOS 13.4
13.4
部分支持 12
注意事项
The event handler is exposed but will not actually be called unless both the "Web Animations" and "CSS Animations via Web Animations" preferences are enabled.
Samsung Internet Android 不支持 No
ontransitionstart Chrome 不支持 No Edge 不支持 No Firefox 53 IE ? Opera ? Safari 13.1
13.1
部分支持 12
注意事项
The event handler is exposed but will not actually be called unless both the "Web Animations" and "CSS Animations via Web Animations" preferences are enabled.
WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 53 Opera Android ? Safari iOS 13.4
13.4
部分支持 12
注意事项
The event handler is exposed but will not actually be called unless both the "Web Animations" and "CSS Animations via Web Animations" preferences are enabled.
Samsung Internet Android 不支持 No
onvolumechange Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onwaiting Chrome Yes Edge ≤79 Firefox 3.5 IE ? Opera ? Safari ? WebView Android Yes Chrome Android Yes Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android Yes
onwheel Chrome 61 Edge 12 Firefox Yes IE Yes Opera 48 Safari Yes WebView Android 61 Chrome Android 61 Firefox Android Yes Opera Android 45 Safari iOS Yes Samsung Internet Android 8.0

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
弃用。不要用于新网站。
见实现注意事项。
用户必须明确启用此特征。
用户必须明确启用此特征。
使用非标名称。
使用非标名称。

另请参阅

  1. GlobalEventHandlers
  2. 特性
    1. onabort
    2. onanimationcancel
    3. onanimationend
    4. onanimationiteration
    5. onauxclick
    6. onblur
    7. oncancel
    8. oncanplay
    9. oncanplaythrough
    10. onchange
    11. onclick
    12. onclose
    13. oncontextmenu
    14. oncuechange
    15. ondblclick
    16. ondurationchange
    17. onended
    18. onerror
    19. onfocus
    20. onformdata
    21. ongotpointercapture
    22. oninput
    23. oninvalid
    24. onkeydown
    25. onkeypress
    26. onkeyup
    27. onload
    28. onloadeddata
    29. onloadedmetadata
    30. onloadend
    31. onloadstart
    32. onlostpointercapture
    33. onmousedown
    34. onmouseenter
    35. onmouseleave
    36. onmousemove
    37. onmouseout
    38. onmouseover
    39. onmouseup
    40. onpause
    41. onplay
    42. onplaying
    43. onpointercancel
    44. onpointerdown
    45. onpointerenter
    46. onpointerleave
    47. onpointermove
    48. onpointerout
    49. onpointerover
    50. onpointerup
    51. onreset
    52. onresize
    53. onscroll
    54. onselect
    55. onselectionchange
    56. onselectstart
    57. onsubmit
    58. ontouchcancel
    59. ontouchstart
    60. ontransitioncancel
    61. ontransitionend
    62. onwheel
  3. 实现通过:
    1. Document
    2. HTMLElement
    3. SVGElement
    4. Window
    5. XULElement
  4. Related pages for HTML DOM
    1. BeforeUnloadEvent
    2. DOMStringMap
    3. ErrorEvent
    4. HTMLAnchorElement
    5. HTMLAreaElement
    6. HTMLAudioElement
    7. HTMLBRElement
    8. HTMLBaseElement
    9. HTMLBaseFontElement
    10. HTMLBodyElement
    11. HTMLButtonElement
    12. HTMLCanvasElement
    13. HTMLContentElement
    14. HTMLDListElement
    15. HTMLDataElement
    16. HTMLDataListElement
    17. HTMLDialogElement
    18. HTMLDivElement
    19. HTMLDocument
    20. HTMLElement
    21. HTMLEmbedElement
    22. HTMLFieldSetElement
    23. HTMLFormControlsCollection
    24. HTMLFormElement
    25. HTMLFrameSetElement
    26. HTMLHRElement
    27. HTMLHeadElement
    28. HTMLHeadingElement
    29. HTMLHtmlElement
    30. HTMLIFrameElement
    31. HTMLImageElement
    32. HTMLInputElement
    33. HTMLIsIndexElement
    34. HTMLKeygenElement
    35. HTMLLIElement
    36. HTMLLabelElement
    37. HTMLLegendElement
    38. HTMLLinkElement
    39. HTMLMapElement
    40. HTMLMediaElement
    41. HTMLMetaElement
    42. HTMLMeterElement
    43. HTMLModElement
    44. HTMLOListElement
    45. HTMLObjectElement
    46. HTMLOptGroupElement
    47. HTMLOptionElement
    48. HTMLOptionsCollection
    49. HTMLOutputElement
    50. HTMLParagraphElement
    51. HTMLParamElement
    52. HTMLPictureElement
    53. HTMLPreElement
    54. HTMLProgressElement
    55. HTMLQuoteElement
    56. HTMLScriptElement
    57. HTMLSelectElement
    58. HTMLShadowElement
    59. HTMLSourceElement
    60. HTMLSpanElement
    61. HTMLStyleElement
    62. HTMLTableCaptionElement
    63. HTMLTableCellElement
    64. HTMLTableColElement
    65. HTMLTableDataCellElement
    66. HTMLTableElement
    67. HTMLTableHeaderCellElement
    68. HTMLTableRowElement
    69. HTMLTableSectionElement
    70. HTMLTemplateElement
    71. HTMLTextAreaElement
    72. HTMLTimeElement
    73. HTMLTitleElement
    74. HTMLTrackElement
    75. HTMLUListElement
    76. HTMLUnknownElement
    77. HTMLVideoElement
    78. HashChangeEvent
    79. History
    80. ImageData
    81. Location
    82. MessageChannel
    83. MessageEvent
    84. MessagePort
    85. Navigator
    86. NavigatorGeolocation
    87. NavigatorID
    88. NavigatorLanguage
    89. NavigatorOnLine
    90. NavigatorPlugins
    91. PageTransitionEvent
    92. Plugin
    93. PluginArray
    94. PopStateEvent
    95. PortCollection
    96. PromiseRejectionEvent
    97. RadioNodeList
    98. Transferable
    99. ValidityState
    100. Window
    101. WindowBase64
    102. WindowEventHandlers
    103. WindowTimers