<script language="javascript">
var scrollFunc = function (e) {
e = e || window.event;
if (e.wheelDelta && event.ctrlKey) {//IE/Opera/Chrome
event.returnValue = false;
} else if (e.detail) {//Firefox
event.returnValue = false;
}
}
/*注册事件*/
if (document.addEventListener) {
document.addEventListener('DOMMouseScroll', scrollFunc, false);
}//W3C
window.onmousewheel = document.onmousewheel = scrollFunc;//IE/Opera/Chrome/Safari
</script>
JavaScript 实现禁用浏览器放大缩小
最新推荐文章于 2024-04-23 10:40:05 发布