HTMLElement

HTMLElement interface represents any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it.

特性

Inherits properties from its parent, Element , and implements those from DocumentAndElementEventHandlers , ElementCSSInlineStyle , GlobalEventHandlers , HTMLOrForeignElement and TouchEventHandlers .

HTMLElement.accessKey
DOMString representing the access key assigned to the element.
HTMLElement.accessKeyLabel 只读
返回 DOMString containing the element's assigned access key.
HTMLElement.contentEditable
DOMString , where a value of true means the element is editable and a value of false means it isn't.
HTMLElement.isContentEditable 只读
返回 Boolean that indicates whether or not the content of the element can be edited.
HTMLElement.contextMenu
HTMLMenuElement representing the contextual menu associated with the element. It may be null .
HTMLOrForeignElement.dataset 只读
返回 DOMStringMap with which script can read and write the element's custom data attributes ( data-* ) .
HTMLElement.dir
DOMString , reflecting the dir global attribute, representing the directionality of the element. Possible values are "ltr" , "rtl" ,和 "auto" .
HTMLElement.draggable
Boolean indicating if the element can be dragged.
HTMLElement.dropzone 只读
返回 DOMSettableTokenList reflecting the dropzone global attribute and describing the behavior of the element regarding a drop operation.
HTMLElement.hidden
Boolean indicating if the element is hidden or not.
HTMLElement.inert
Boolean indicating whether the user agent must act as though the given node is absent for the purposes of user interaction events, in-page text searches ("find in page"), and text selection.
HTMLElement.innerText
Represents the "rendered" text content of a node and its descendants. As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard.
HTMLElement.itemScope
Boolean representing the item scope.
HTMLElement.itemType 只读
返回 DOMSettableTokenList
HTMLElement.itemId
DOMString representing the item ID.
HTMLElement.itemRef 只读
返回 DOMSettableTokenList
HTMLElement.itemProp 只读
返回 DOMSettableTokenList
HTMLElement.itemValue
返回 Object representing the item value.
HTMLElement.lang
DOMString representing the language of an element's attributes, text, and element contents.
HTMLElement.noModule
Boolean indicating whether an import script can be executed in user agents that support module scripts.
HTMLOrForeignElement.nonce
Returns the cryptographic number used once that is used by Content Security Policy to determine whether a given fetch will be allowed to proceed.
HTMLElement.offsetHeight 只读
返回 double containing the height of an element, relative to the layout.
HTMLElement.offsetLeft 只读
返回 double , the distance from this element's left border to its offsetParent 's left border.
HTMLElement.offsetParent 只读
返回 Element that is the element from which all offset calculations are currently computed.
HTMLElement.offsetTop 只读
返回 double , the distance from this element's top border to its offsetParent 's top border.
HTMLElement.offsetWidth 只读
返回 double containing the width of an element, relative to the layout.
HTMLElement.properties 只读
返回 HTMLPropertiesCollection
HTMLElement.spellcheck
Boolean that controls spell-checking . It is present on all HTML elements, though it doesn't have an effect on all of them.
HTMLElement.style
CSSStyleDeclaration , an object representing the declarations of an element's style attributes.
HTMLOrForeignElement.tabIndex
long representing the position of the element in the tabbing order.
HTMLElement.title
DOMString containing the text that appears in a popup box when mouse is over the element.
HTMLElement.translate
Boolean representing the translation.

事件处理程序

Most event handler properties, of the form onXYZ , are defined on the DocumentAndElementEventHandlers , GlobalEventHandlers or TouchEventHandlers interfaces and implemented by HTMLElement . In addition, the following handlers are specific to HTMLElement .

HTMLElement.oncopy
Returns the event handling code for the copy event ( bug 280959 ).
HTMLElement.oncut
Returns the event handling code for the cut event ( bug 280959 ).
HTMLElement.onpaste
Returns the event handling code for the paste event ( bug 280959 ).
TouchEventHandlers.ontouchstart
Returns the event handling code for the touchstart 事件。
TouchEventHandlers.ontouchend
Returns the event handling code for the touchend 事件。
TouchEventHandlers.ontouchmove
Returns the event handling code for the touchmove 事件。
TouchEventHandlers.ontouchenter
Returns the event handling code for the touchenter 事件。
TouchEventHandlers.ontouchleave
Returns the event handling code for the touchleave 事件。
TouchEventHandlers.ontouchcancel
Returns the event handling code for the touchcancel 事件。

方法

Inherits methods from its parent, Element , and implements those from DocumentAndElementEventHandlers , ElementCSSInlineStyle , GlobalEventHandlers , HTMLOrForeignElement and TouchEventHandlers .

HTMLElement.attachInternals()
Attaches an ElementInternals instance to the custom element.
HTMLOrForeignElement.blur()
Removes keyboard focus from the currently focused element.
HTMLElement.click()
Sends a mouse click event to the element.
HTMLOrForeignElement.focus()
Makes the element the current keyboard focus.
HTMLElement.forceSpellCheck()
Runs the spell checker on the element's contents.

Events

监听这些事件使用 addEventListener() 或通过把事件监听器赋值给 on eventname 特性为此接口。

invalid
Fired when an element does not satisfy its constraints during constraint validation.
Also available via the oninvalid 特性。

动画事件

animationcancel
Fired when an animation unexpectedly aborts.
Also available via the onanimationcancel 特性。
animationend
Fired when an animation has completed normally.
Also available via the onanimationend 特性。
animationiteration
Fired when an animation iteration has completed.
Also available via the onanimationiteration 特性。
animationstart
Fired when an animation starts.
Also available via the onanimationstart 特性。

Input events

beforeinput
Fired when the value of an <input> , <select> ,或 <textarea> element is about to be modified.
input
Fired when the value of an <input> , <select> ,或 <textarea> element has been changed.
Also available via the oninput 特性。
change
Fired when the value of an <input> , <select> ,或 <textarea> element has been changed and committed by the user. Unlike the input event, the change event is not necessarily fired for each alteration to an element's value .

Pointer events

gotpointercapture
Fired when an element captures a pointer using setPointerCapture() .
Also available via the ongotpointercapture 特性。
lostpointercapture
Fired when a captured pointer is released.
Also available via the onlostpointercapture 特性。
pointercancel
Fired when a pointer event is canceled.
Also available via the onpointercancel 特性。
pointerdown
Fired when a pointer becomes active.
Also available via the onpointerdown 特性。
pointerenter
Fired when a pointer is moved into the hit test boundaries of an element or one of its descendants.
Also available via the onpointerenter 特性。
pointerleave
Fired when a pointer is moved out of the hit test boundaries of an element.
Also available via the onpointerleave 特性。
pointermove
Fired when a pointer changes coordinates.
Also available via the onpointermove 特性。
pointerout
Fired when a pointer is moved out of the hit test boundaries of an element (among other reasons).
Also available via the onpointerout 特性。
pointerover
Fired when a pointer is moved into an element's hit test boundaries.
Also available via the onpointerover 特性。
pointerup
Fired when a pointer is no longer active.
Also available via the onpointerup 特性。

过渡事件

transitioncancel
Fired when a CSS transition is canceled.
Also available via the ontransitioncancel 特性。
transitionend
Fired when a CSS transition has completed.
Also available via the ontransitionend 特性。
transitionrun
Fired when a CSS transition is first created.
Also available via the ontransitionrun 特性。
transitionstart
Fired when a CSS transition has actually started.
Also available via the ontransitionstart 特性。

规范

规范 状态 Comment
CSS Object Model (CSSOM) View Module
The definition of 'HTMLElement' in that specification.
工作草案 Added the following properties: offsetParent , offsetTop , offsetLeft , offsetWidth ,和 offsetHeight .
HTML Living Standard
The definition of 'HTMLElement' in that specification.
实时标准 Added the following properties: translate , itemScope , itemType , itemId , itemRef , itemProp , properties ,和 itemValue .
Added the following method: forceSpellcheck() .
Moved the onXYZ attributes to the GlobalEventHandlers interface and added an inheritance from it.
HTML5
The definition of 'HTMLElement' in that specification.
Recommendation Added the following properties: dataset , hidden , tabindex , accessKey , accessKeyLabel , draggable , dropzone , contentEditable , isContentEditable , contextMenu , spellcheck , commandType , commandLabel , commandIcon , commandHidden , commandDisabled , commandChecked , style , and all the onXYZ 特性。
Moved the id and className properties to the Element 接口。
Document Object Model (DOM) Level 2 HTML Specification
The definition of 'HTMLElement' in that specification.
Obsolete No change from Document Object Model (DOM) Level 2 HTML Specification
Document Object Model (DOM) Level 1 Specification
The definition of 'HTMLElement' in that specification.
Obsolete 初始定义。

浏览器兼容性

更新 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
HTMLElement Chrome 1 Edge 12 Firefox 1 IE 5.5 Opera 8 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
accessKey Chrome 17 Edge 12 Firefox 5 IE ? Opera Yes Safari 6 WebView Android 4.4 Chrome Android 18 Firefox Android 5 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
accessKeyLabel Chrome No Edge No Firefox 8 IE ? Opera ? Safari ? WebView Android No Chrome Android No Firefox Android 8 Opera Android ? Safari iOS ? Samsung Internet Android No
animationcancel event Chrome No Edge No Firefox 54 IE No Opera No Safari 13.1
13.1
12
Disabled
Disabled From version 12: this feature is behind the Web 动画 preference and the CSS Animations via Web Animations preference.
WebView Android No Chrome Android No Firefox Android 54 Opera Android No Safari iOS 13.4
13.4
12
Disabled
Disabled From version 12: this feature is behind the Web 动画 preference and the CSS Animations via Web Animations preference.
Samsung Internet Android No
animationend event Chrome 43 Edge 12 Firefox Yes IE 10 Opera 30 Safari 9 WebView Android 43 Chrome Android 43 Firefox Android Yes Opera Android 30 Safari iOS 9 Samsung Internet Android 4.0
animationiteration event Chrome 43 Edge 12 Firefox 51 IE 10 Opera 30 Safari 9 WebView Android 43 Chrome Android 43 Firefox Android 51 Opera Android 30 Safari iOS 9 Samsung Internet Android 4.0
animationstart event Chrome 43 Edge 12 Firefox 51 IE 10 Opera 30 Safari 9 WebView Android 43 Chrome Android 43 Firefox Android 51 Opera Android 30 Safari iOS 9 Samsung Internet Android 4.0
autocapitalize Chrome 66 Edge ≤79 Firefox ? IE ? Opera ? Safari ? WebView Android 66 Chrome Android 66 Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android 9.0
beforeinput event
Chrome Yes Edge 79 Firefox No IE No Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android No Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
blur Chrome 1 Edge 12 Firefox 5 IE 9 Opera 8 Safari 3 WebView Android 4.4 Chrome Android 18 Firefox Android 5 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
click() Chrome 9
9
Before Chrome 19, click() is only defined on buttons and inputs.
Edge 12 Firefox 3
3
Before Firefox 5, click() is only defined on buttons and inputs, and has no effect on text and file inputs.
Starting in Firefox 75, the click() function works even when the element is not attached to a DOM tree.
IE 8 Opera 10.5 Safari 6 WebView Android ≤37
≤37
Before Android WebView 4.4, click() is only defined on buttons and inputs.
Chrome Android 18
18
Before Chrome 19, click() is only defined on buttons and inputs.
Firefox Android 5 Opera Android 11 Safari iOS 6 Samsung Internet Android 1.0
1.0
Before Samsung Internet 1.5, click() is only defined on buttons and inputs.
contentEditable Chrome 1 Edge 12 Firefox 3 IE 8 Opera 9 Safari 6 WebView Android 4.4 Chrome Android 18 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
contextMenu
弃用 非标
Chrome 45 — 61 Edge ≤18 — 79 Firefox 1 IE ? Opera ? Safari ? WebView Android 45 — 61 Chrome Android 45 — 61 Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android 5.0 — 8.0
dataset Chrome 8 Edge 12 Firefox 6 IE 11 Opera 11 Safari 5.1 WebView Android 4.4 Chrome Android 18 Firefox Android 6 Opera Android 11 Safari iOS 5.1 Samsung Internet Android 1.0
dir Chrome 1 Edge 12 Firefox 1 IE ? Opera Yes Safari 6 WebView Android 4.4 Chrome Android 18 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
draggable Chrome 7 Edge 12 Firefox 2 IE Yes Opera 12 Safari 6 WebView Android 4.4 Chrome Android 18 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
dropzone Chrome 14 — 59 Edge ≤18 — 79 Firefox 1 IE ? Opera ? Safari ? WebView Android 4.4 — 59 Chrome Android 18 — 59 Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android 1.0 — 7.0
focus Chrome 1 Edge 12 Firefox 5 IE 9 Opera 8 Safari 3 WebView Android 4.4 Chrome Android 18 Firefox Android 5 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
forceSpellCheck
非标
Chrome No Edge No Firefox No IE No Opera No Safari ? WebView Android No Chrome Android No Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android No
gotpointercapture event 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
hidden Chrome 6 Edge 12 Firefox 1 IE 11 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
inert Chrome 60 Edge ≤18 Firefox ? IE ? Opera 47 Safari ? WebView Android 60 Chrome Android 60 Firefox Android ? Opera Android 44 Safari iOS ? Samsung Internet Android 8.0
innerText Chrome 1 Edge 12 Firefox 45 IE 5.5 Opera 9.6 Safari 3 WebView Android 4.4 Chrome Android 18 Firefox Android 45 Opera Android 10.1 Safari iOS 4 Samsung Internet Android 1.0
input event Chrome 1 Edge 79
79
不支持 12 — 79
Not supported on select , checkbox ,或 radio inputs.
Firefox 6 IE 部分支持 9
部分支持 9
Only supports input of type text and password .
Opera 11.6 Safari 3.1 WebView Android 1 Chrome Android 18 Firefox Android 6 Opera Android 12 Safari iOS 2 Samsung Internet Android 1.0
inputMode Chrome 66 Edge ≤79 Firefox ? IE ? Opera Yes Safari ? WebView Android 66 Chrome Android 66 Firefox Android ? Opera Android Yes Safari iOS ? Samsung Internet Android 9.0
isContentEditable Chrome 1 Edge 12 Firefox 1 IE ? Opera Yes Safari 6 WebView Android 4.4 Chrome Android 18 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
itemId
Chrome 17 — 28 Edge No Firefox 6 IE No Opera 11 — 15 Safari ? WebView Android No Chrome Android 18 — 28 Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android 1.0 — 1.5
itemProp
Chrome 17 — 28 Edge No Firefox 6 IE No Opera 11 — 15 Safari ? WebView Android No Chrome Android 18 — 28 Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android 1.0 — 1.5
itemRef
Chrome 17 — 28 Edge No Firefox 6 IE No Opera 11 — 15 Safari ? WebView Android No Chrome Android 18 — 28 Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android 1.0 — 1.5
itemScope
Chrome 17 — 28 Edge No Firefox 6 IE No Opera 11 — 15 Safari ? WebView Android No Chrome Android 18 — 28 Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android 1.0 — 1.5
itemType
Chrome 17 — 28 Edge No Firefox 6 IE No Opera 11 — 15 Safari ? WebView Android No Chrome Android 18 — 28 Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android 1.0 — 1.5
itemValue Chrome 17 — 28 Edge No Firefox 6 IE No Opera 11 — 15 Safari ? WebView Android No Chrome Android 18 — 28 Firefox Android 4 Opera Android ? Safari iOS ? Samsung Internet Android 1.0 — 1.5
lang Chrome 1 Edge 12 Firefox 1 IE ? Opera Yes Safari 6 WebView Android 4.4 Chrome Android 18 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
lostpointercapture event 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
noModule Chrome 60 Edge ≤79 Firefox ? IE No Opera 47 Safari ? WebView Android 60 Chrome Android 60 Firefox Android ? Opera Android 44 Safari iOS ? Samsung Internet Android 8.0
nonce Chrome 61 Edge 79 Firefox 75 IE No Opera Yes Safari 10 WebView Android 61 Chrome Android 61 Firefox Android No Opera Android Yes Safari iOS 10 Samsung Internet Android 8.0
offsetHeight Chrome 1 Edge 12 Firefox 1 IE 8 Opera 8 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
offsetLeft Chrome 1 Edge 12 Firefox 1 IE 8 Opera 8 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
offsetParent Chrome 1 Edge 12 Firefox 1 IE 8 Opera 8 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
offsetTop Chrome 1 Edge 12 Firefox 1 IE 8 Opera 8 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
offsetWidth Chrome 1 Edge 12 Firefox 1 IE 8 Opera 8 Safari 3 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0
oncopy
非标
Chrome 71 Edge 12 Firefox 3 IE ? Opera Yes Safari Yes WebView Android 71 Chrome Android 71 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 10.0
oncut
非标
Chrome 71 Edge 12 Firefox 3 IE ? Opera Yes Safari Yes WebView Android 71 Chrome Android 71 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 10.0
onModule Chrome 60 Edge ≤79 Firefox ? IE ? Opera 47 Safari ? WebView Android 60 Chrome Android 60 Firefox Android ? Opera Android 44 Safari iOS ? Samsung Internet Android 8.0
onpaste
非标
Chrome 71 Edge 12 Firefox 3 IE ? Opera Yes Safari Yes WebView Android 71 Chrome Android 71 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 10.0
outerText
非标
Chrome 43 Edge 12 Firefox No IE Yes Opera Yes Safari 6 WebView Android 43 Chrome Android 43 Firefox Android No Opera Android Yes Safari iOS Yes Samsung Internet Android 4.0
pointercancel event Chrome 55 Edge 12
12
不支持 12 — 79
Alternate Name
Alternate Name Uses the non-standard name: mspointercancel
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: mspointercancel
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
pointerdown event Chrome 55 Edge 12
12
不支持 12 — 79
Alternate Name
Alternate Name Uses the non-standard name: mspointerdown
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: mspointerdown
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
pointerenter event Chrome 55 Edge 12
12
不支持 12 — 79
Alternate Name
Alternate Name Uses the non-standard name: mspointerenter
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: mspointerenter
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
pointerleave event Chrome 55 Edge 12
12
不支持 12 — 79
Alternate Name
Alternate Name Uses the non-standard name: mspointerleave
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: mspointerleave
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
pointermove event Chrome 55 Edge 12
12
不支持 12 — 79
Alternate Name
Alternate Name Uses the non-standard name: mspointermove
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: mspointermove
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
pointerout event Chrome 55 Edge 12
12
不支持 12 — 79
Alternate Name
Alternate Name Uses the non-standard name: mspointerout
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: mspointerout
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
pointerover event Chrome 55 Edge 12
12
不支持 12 — 79
Alternate Name
Alternate Name Uses the non-standard name: mspointerover
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: mspointerover
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
pointerup event Chrome 55 Edge 12
12
不支持 12 — 79
Alternate Name
Alternate Name Uses the non-standard name: mspointerup
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: mspointerup
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
spellcheck Chrome 43 Edge 12 Firefox 2 IE ? Opera Yes Safari 6 WebView Android 43 Chrome Android 43 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 4.0
style Chrome 45 Edge 12 Firefox 1 IE 8 Opera 8 Safari 11 WebView Android 45 Chrome Android 45 Firefox Android 4 Opera Android 10.1 Safari iOS 11 Samsung Internet Android 5.0
tabIndex Chrome 1 Edge 18
18
部分支持 12
Returns incorrect value for elements without an explicit tabindex attribute. See issue 4365703 了解细节。
Firefox 1 IE 部分支持 8
部分支持 8
Returns incorrect value for elements without an explicit tabindex attribute. See issue 4365703 了解细节。
Opera Yes Safari 6 WebView Android 4.4 Chrome Android 18 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
title Chrome 1 Edge 12 Firefox 1 IE ? Opera Yes Safari 6 WebView Android 4.4 Chrome Android 18 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.0
transitioncancel event Chrome 74 Edge ≤79 Firefox 53 IE ? Opera 62 Safari 13.1
13.1
12
Disabled
Disabled From version 12: this feature is behind the Web 动画 preference and the CSS Animations via Web Animations preference.
WebView Android 74 Chrome Android 74 Firefox Android 53 Opera Android 53 Safari iOS 13.4
13.4
12
Disabled
Disabled From version 12: this feature is behind the Web 动画 preference and the CSS Animations via Web Animations preference.
Samsung Internet Android 11.0
transitionend event Chrome 26
26
1
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
Edge ≤79
≤79
≤79
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
Firefox 51 IE 10 Opera 12.1
12.1
15
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
不支持 11.6 — 15
Alternate Name
Alternate Name Uses the non-standard name: oTransitionEnd
Safari 6.1
6.1
4
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
WebView Android ≤37
≤37
1
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
Chrome Android 26
26
18
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
Firefox Android 51 Opera Android 12.1
12.1
14
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
不支持 12 — 14
Alternate Name
Alternate Name Uses the non-standard name: oTransitionEnd
Safari iOS 7
7
3.2
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
Samsung Internet Android 1.5
1.5
1.0
Alternate Name
Alternate Name Uses the non-standard name: webkitTransitionEnd
transitionrun event Chrome 74 Edge ≤79 Firefox 53 IE ? Opera 62 Safari 13.1
13.1
12
Disabled
Disabled From version 12: this feature is behind the Web 动画 preference and the CSS Animations via Web Animations preference.
WebView Android 74 Chrome Android 74 Firefox Android 53 Opera Android 53 Safari iOS 13.4
13.4
12
Disabled
Disabled From version 12: this feature is behind the Web 动画 preference and the CSS Animations via Web Animations preference.
Samsung Internet Android 11.0
transitionstart event Chrome 74 Edge ≤79 Firefox 53 IE ? Opera 62 Safari 13.1
13.1
12
Disabled
Disabled From version 12: this feature is behind the Web 动画 preference and the CSS Animations via Web Animations preference.
WebView Android 74 Chrome Android 74 Firefox Android 53 Opera Android 53 Safari iOS 13.4
13.4
12
Disabled
Disabled From version 12: this feature is behind the Web 动画 preference and the CSS Animations via Web Animations preference.
Samsung Internet Android 11.0
translate
Chrome 19 Edge 79 Firefox No IE No Opera No Safari 6 WebView Android 4.4 Chrome Android 25 Firefox Android 4 Opera Android Yes Safari iOS Yes Samsung Internet Android 1.5

图例

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

另请参阅

  1. HTMLElement
  2. 特性
    1. contentEditable
    2. contextMenu
    3. dir
    4. hidden
    5. innerText
    6. isContentEditable
    7. lang
    8. offsetHeight
    9. offsetLeft
    10. offsetParent
    11. offsetTop
    12. offsetWidth
    13. onabort
    14. onanimationcancel
    15. onanimationend
    16. onanimationiteration
    17. onauxclick
    18. onblur
    19. oncancel
    20. oncanplay
    21. oncanplaythrough
    22. onchange
    23. onclick
    24. onclose
    25. oncontextmenu
    26. oncopy
    27. oncuechange
    28. oncut
    29. ondblclick
    30. ondurationchange
    31. onended
    32. onerror
    33. onfocus
    34. onformdata
    35. ongotpointercapture
    36. oninput
    37. oninvalid
    38. onkeydown
    39. onkeypress
    40. onkeyup
    41. onload
    42. onloadeddata
    43. onloadedmetadata
    44. onloadend
    45. onloadstart
    46. onlostpointercapture
    47. onmousedown
    48. onmouseenter
    49. onmouseleave
    50. onmousemove
    51. onmouseout
    52. onmouseover
    53. onmouseup
    54. onpaste
    55. onpause
    56. onplay
    57. onplaying
    58. onpointercancel
    59. onpointerdown
    60. onpointerenter
    61. onpointerleave
    62. onpointermove
    63. onpointerout
    64. onpointerover
    65. onpointerup
    66. onreset
    67. onresize
    68. onscroll
    69. onselect
    70. onselectionchange
    71. onselectstart
    72. onsubmit
    73. ontouchcancel
    74. ontouchstart
    75. ontransitioncancel
    76. ontransitionend
    77. onwheel
    78. outerText
    79. title
  3. 方法
    1. click()
    2. forceSpellCheck()
  4. Events
    1. animationcancel
    2. animationend
    3. animationiteration
    4. animationstart
    5. beforeinput
    6. change
    7. gotpointercapture
    8. input
    9. lostpointercapture
    10. pointercancel
    11. pointerdown
    12. pointerenter
    13. pointerleave
    14. pointermove
    15. pointerout
    16. pointerover
    17. pointerup
    18. transitioncancel
    19. transitionend
    20. transitionrun
    21. transitionstart
  5. 继承:
    1. Element
    2. Node
    3. EventTarget
  6. Related pages for HTML DOM
    1. BeforeUnloadEvent
    2. DOMStringMap
    3. ErrorEvent
    4. GlobalEventHandlers
    5. HTMLAnchorElement
    6. HTMLAreaElement
    7. HTMLAudioElement
    8. HTMLBRElement
    9. HTMLBaseElement
    10. HTMLBaseFontElement
    11. HTMLBodyElement
    12. HTMLButtonElement
    13. HTMLCanvasElement
    14. HTMLContentElement
    15. HTMLDListElement
    16. HTMLDataElement
    17. HTMLDataListElement
    18. HTMLDialogElement
    19. HTMLDivElement
    20. HTMLDocument
    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