--- title: GlobalEventHandlers.onlostpointercapture slug: Web/API/GlobalEventHandlers/onlostpointercapture translation_of: Web/API/GlobalEventHandlers/onlostpointercapture ---
{{ApiRef("HTML DOM")}}
The onlostpointercapture {{event("Event_handlers", "event handler")}} property of the {{domxref("GlobalEventHandlers")}} interface returns the event handler (function) for the {{event("lostpointercapture")}} event type.
语法
window.onlostpointercapture = functionReference
<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>
规范
| 规范 | 状态 | 评论 |
|---|---|---|
| {{SpecName('Pointer Events 2','#the-lostpointercapture-event', 'onlostpointercapture')}} | {{Spec2('Pointer Events 2')}} |
浏览器兼容性
{{Compat("api.GlobalEventHandlers.onlostpointercapture")}}