我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!
您也可以阅读此文章的English (US)版。

A global event handler for the pointerup event.


var upHandler = targetElement.onpointerup;

Return value

The pointerup event handler for element targetElement.


This example shows two ways to use onpointerup to set an element's pointerup event handler.

function upHandler(ev) {
 // Process the pointerup event
function init() {
 var el=document.getElementById("target1");
 el.onpointerup = upHandler;
<body onload="init();">
<div id="target1"> Touch me ... </div>
<div id="target2" onpointerup="upHandler(event)"> Touch me ... </div>


Specification Status Comment
Pointer Events – Level 2
The definition of 'onpointerup' in that specification.
Editor's Draft Non-stable version
Pointer Events
The definition of 'onpointerup' in that specification.
Recommendation Initial definition

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 55.0 (Yes) (Yes) 10 42 No support
Feature Android Android Webview Edge Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support 55.0 (Yes) No support No support 10 42 No support 55.0

See also


 此页面的贡献者: erikadoyle, jpmedley, rolfedh, Sebastianz, AFBarstow
 最后编辑者: erikadoyle,