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

{{APIRef("DOM Events")}}{{ non-standard_header() }}{{deprecated_header}}

+ +

MouseScrollEvent事件对象代表了当用户在滚动鼠标滚轮或操作其他类似的输入设备时触发的事件.

+ +

要优先使用标准化过的WheelEvent来代替该陈旧的事件对象.

+ +

方法概述

+ + + + + + + +
void initMouseScrollEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTargetArg, in long axis);
+ +

属性

+ + + + + + + + + + + + + + +
名称 +

类型

+
描述
axislong表明鼠标滚轮滚动的方向. 只读.
+ +

常量

+ +

Delta 模式

+ + + + + + + + + + + + + + + + + + + +
名称描述
HORIZONTAL_AXIS0x01该事件是由鼠标滚轮的横向滚动触发的
VERTICAL_AXIS0x02该事件是由鼠标滚轮的纵向滚动触发的
+ +

方法

+ +

initMouseScrollEvent()

+ +

查看 nsIDOMMouseScrollEvent::initMouseScrollEvent().

+ +

滚轮相关事件对比

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
事件类型事件对象是否标准兼容性
mousewheelMouseWheelEvent非标准只有Firefox不支持
DOMMouseScrollMouseScrollEvent非标准只有Firefox支持
wheelWheelEventDOM Level 3Firefox 17+ ie9+
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{ CompatNo() }}{{ CompatGeckoDesktop("1.9.1") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatNo() }}{{ CompatGeckoMobile("1.9.1") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +

相关链接

+ + -- cgit v1.2.3-54-g00ecf