GlobalEventHandlers.onpointerup

这篇翻译不完整。请帮忙从英语翻译这篇文章

pointerup是一个全局的事件处理函数.

语法

var upHandler = targetElement.onpointerup;

返回值

upHandler
返回 targetElement 元素的pointerup事件处理函数.

示例

如下是两种设置元素pointerup事件处理函数的方法.

<html>
<script>
function upHandler(ev) {
 // 这里添加元素的pointup事件处理函数
}
function init() {
 var el=document.getElementById("target1");
 el.onpointerup = upHandler;
}
</script>
<body onload="init();">
<div id="target1"> Touch me ... </div>
<div id="target2" onpointerup="upHandler(event)"> Touch me ... </div>
</body>
</html>

规范

Specification Status Comment
Pointer Events – Level 2
onpointerup
Working Draft Non-stable version
Pointer Events
onpointerup
Recommendation Initial definition

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 35[1] 59 (59) 10 -ms
11
? 未实现
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 35[1] 29.0 (29)[2] 10 -ms
11
? 未实现

[1] This was implemented in bug 248918.

[2] Supported behind the preference dom.w3c_pointer_events.enabled, defaulting to false.

相关链接

文档标签和贡献者

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