From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../globaleventhandlers/onpointerout/index.html | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 files/zh-cn/web/api/globaleventhandlers/onpointerout/index.html (limited to 'files/zh-cn/web/api/globaleventhandlers/onpointerout/index.html') diff --git a/files/zh-cn/web/api/globaleventhandlers/onpointerout/index.html b/files/zh-cn/web/api/globaleventhandlers/onpointerout/index.html new file mode 100644 index 0000000000..e702faa2a7 --- /dev/null +++ b/files/zh-cn/web/api/globaleventhandlers/onpointerout/index.html @@ -0,0 +1,79 @@ +--- +title: GlobalEventHandlers.onpointerout +slug: Web/API/GlobalEventHandlers/onpointerout +translation_of: Web/API/GlobalEventHandlers/onpointerout +--- +
{{ApiRef("HTML DOM")}}
+ +

一个{{domxref("GlobalEventHandlers","global event handler")}} 用于处理 {{event("pointerout")}} 事件。

+ +

语法

+ +
var outHandler = targetElement.onpointerout;
+
+ +

返回值

+ +
+
outHandler
+
元素targetElement的指针输出事件处理程序。
+
+ +

例子

+ +

这个例子展示了两种方式来使用onpointerout设置元素的pointerout事件处理程序。

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

规范

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Pointer Events 2','#widl-GlobalEventHandlers-onpointerout', 'onpointerout')}}{{Spec2('Pointer Events 2')}}Non-stable version
{{SpecName('Pointer Events', '#widl-GlobalEventHandlers-onpointerout', 'onpointerout')}}{{Spec2('Pointer Events')}}Initial definition
+ +

浏览器兼容性

+ + + +

{{Compat("api.GlobalEventHandlers.onpointerout")}}

+ +

相关链接

+ + + +

+ +

-- cgit v1.2.3-54-g00ecf