全局事件处理器.onpointerover

翻译正在进行中。

A global event handler for the pointerover event.

语法

var overHandler = targetElement.onpointerover;

返回值

overHandler
 pointerover 事件处理器返回目标元素的overHandler.

案例

这里使用两种方式展示了如何去使用 onpointerover 去设置一个元素的 pointerover 事件处理器

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

说明

说明 状态 备注
Pointer Events – Level 2
onpointerover
Working Draft 不稳定版本
Pointer Events
onpointerover
Recommendation 初始定义

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 35Edge 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: onmspointerover
Opera ? Safari No support NoWebView Android Full support 37Chrome Android Full support 35Edge Mobile Full support YesFirefox 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.

参见

文档标签和贡献者

此页面的贡献者: loveWct
最后编辑者: loveWct,