现在的位置: 首页 > 综合 > 正文

浅谈 Mousewheel 事件

2012年07月24日 ⁄ 综合 ⁄ 共 1714字 ⁄ 字号 评论关闭

其实在大多数浏览器(IE6, IE7, IE8, Opera 10+, Safari 5+)中,都提供了 “mousewheel” 事件。但杯具的是 Firefox 3.5+ 却不支持此事件,不过庆幸 Firefox 3.5+ 中提供了另外一个等同的事件:”DOMMouseScroll” (事件和事件属性的测试案例)。
xmlns="http://www.w3.org/1999/xhtml">


Mousewheel Event in JavaScript

  1. IE6, IE7, IE8, Opera 10+, Safari 5+ support mousewheel.
  2. Firefox 3.5+ support DOMMouseScroll.
  3. IE6, IE7, IE8, Opera 10+, Safari 5+ support event.wheelDelta.
  4. Firefox 3.5+, Opera 10+ support event.detail.
  5. The event.wheelDelta value is a multiple of 120.
  6. The event.detail value is a multiple of 3.
Mousewheel Event: mousewheel
Mousewheel Event: DOMMouseScroll

Related Articles: http://www.planabc.net/2010/08/12/mousewheel_event_in_javascript/

抱歉!评论已关闭.