Javascript (or some other lang) to detect the wheel direction without using pageYOffset
问题 I have a page not higher than the window => it has no scroller. How can I detect the direction, in which the wheel is rolled? And if JavaScript can't handle this, is there some other net language to help my case? Thanks 回答1: It's given to you wholesale on the MDN page for "wheel" events, reproduced below: (function(window,document) { var prefix = "", _addEventListener, onwheel, support; // detect event model if ( window.addEventListener ) { _addEventListener = "addEventListener"; } else {