GlobalEventHandlers.onpointerout

您正在阅读此内容的英文版本,因为该语系尚未翻译。 帮助我们翻译此文章吧!

一个global event handler 用于处理 pointerout 事件。

语法

var outHandler = targetElement.onpointerout;

返回值

outHandler
元素targetElement的指针输出事件处理程序。

例子

这个例子展示了两种方式来使用onpointerout设置元素的pointerout事件处理程序。

<html>
<script>
function outHandler(ev) {
 // Process the pointerout event
}
function init() {
 var el=document.getElementById("target1");
 el.onpointerout = outHandler;
}
</script>
<body onload="init();">
<div id="target1"> Touch me ... </div>
<div id="target2" onpointerout="outHandler(event)"> Touch me ... </div>
</body>
</html>

规范

Specification Status Comment
Pointer Events – Level 2
onpointerout
Recommendation Non-stable version
Pointer Events
onpointerout
Obsolete Initial definition

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onpointeroutChrome Full support 55Edge Full support YesFirefox Full support 59
Full support 59
Full support 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 Full support 11
Full support 11
Full support 10
Alternate Name
Alternate Name Uses the non-standard name: onmspointerout
Opera ? Safari No support NoWebView Android Full support 55Chrome Android Full support 55Firefox Android Full support 29
Disabled
Full support 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 support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
User must explicitly enable this feature.
User must explicitly enable this feature.
Uses a non-standard name.
Uses a non-standard name.

相关链接