我們的志工尚未將此文章翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.
The MouseWheelEvent
interface represents events that occur due to the user turning a mouse wheel.
Do not use this interface for wheel events.
Like MouseScrollEvent
, this interface is non-standard and deprecated. It was used in non-Gecko browsers only. Instead use the standard WheelEvent
.
Properties
Attribute | Type | Description |
wheelDelta |
long |
The distance in pixels (defined as so by MSDN, but the actual usage is different, see mousewheel ). Read only. |
wheelDeltaX |
long ? |
The value along horizontal axis of wheelDelta . Read only. |
wheelDeltaY |
long ? |
The value along vertical axis of wheelDelta . Read only. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | (Yes) | Not supported | 6.0 | (Yes) | (Yes) |
window.MouseWheelEvent |
Not supported | Not supported | 9.0 | Not supported | Not supported |
wheelDeltaX |
(Yes) | Not supported | Not supported | Not supported | (Yes) |
wheelDeltaY |
(Yes) | Not supported | Not supported | Not supported | (Yes) |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? | Not supported | ? | ? | ? |
window.MouseWheelEvent |
? | Not supported | ? | ? | ? |
wheelDeltaX |
? | Not supported | ? | ? | ? |
wheelDeltaY |
? | Not supported | ? | ? | ? |
See also
- An event type which is used by this event object:
mousewheel
- A standardized mouse wheel event object:
WheelEvent
- Gecko's legacy mouse wheel event object:
MouseScrollEvent
- The document in MSDN: MouseWheelEvent object