此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

GlobalEventHandlers.onlostpointercapture

基线 广泛可用

自 2020年7月 起,此特性已在主流浏览器中得到支持,可在大多数设备和浏览器版本中正常使用。

The onlostpointercapture event handler property of the GlobalEventHandlers interface returns the event handler (function) for the lostpointercapture event type.

语法

window.onlostpointercapture = functionReference

示例

js
<html>
<script>
function overHandler(ev) {
 // Determine the target event's lostpointercapture handler
 var lostCaptureHandler = ev.target.onlostpointercapture;
}
function init() {
 var el=document.getElementById("target");
 el.onlostpointercapture = overHandler;
}
</script>
<body onload="init();">
<div id="target"> Touch me ... </div>
</body>
</html>

规范

规范
Pointer Events
# the-lostpointercapture-event
Pointer Events
# dom-globaleventhandlers-onlostpointercapture

浏览器兼容性

参见