<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function demo(e){
if(e.wheelDelta){
if(e.wheelDelta > 0){
console.log("up")
}
if(e.wheelDelta < 0){
console.log("down")
}
}
}
window.addEventListener("mousewheel",demo)
</script>
</body>
</html>
05-19
652
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-13