let div = document.getElementById("Id");
div.addEventListener("mousewheel",func);
function func(e){
//代码块
}
利用事件监听器添加鼠标滚轮事件
最新推荐文章于 2022-04-27 19:04:39 发布
let div = document.getElementById("Id");
div.addEventListener("mousewheel",func);
function func(e){
//代码块
}