一个简单的禁止鼠标滚轮事件处理
- function disabledMouseWheel() {
- if (document.addEventListener) {
- document.addEventListener('DOMMouseScroll', scrollFunc, false); //W3C
- }else{
- window.onmousewheel = document.onmousewheel = scrollFunc;//IE/Opera/Chrome
- }
- function scrollFunc(evt) {
- return false;
- }
- window.onload=disabledMouseWheel;