<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="" content=""> <title></title> <style> </style> </head> <body> <p>ok</p> <script> var moveWheel1 = true; var moveWheel2 = false; var wheelClock; function stopWheel(){ if(moveWheel2 == true){ console.log("滚轮停止了"); moveWheel2 = false; moveWheel1 = true; } } function moveWheel(e){ var e = e || window.event; if(moveWheel1==true){ if(e.wheelDelta){ if(e.wheelDelta > 0) { console.log("鼠标滚轮向上滚动") }; if(e.wheelDelta < 0){ console.log("鼠标滚轮向下滚动") } } moveWheel1 = false; moveWheel2 = true; wheelClock = setTimeout(stopWheel,200); } else { clearTimeout(wheelClock); wheelClock = setTimeout(stopWheel,150); } } document.addEventListener(‘wheel‘, moveWheel, false); </script> </body> </html>