87,910
社区成员
发帖
与我相关
我的任务
分享
<body>
<div id='odiv' style="width:300px;height:300px;background-color:red">滚动滑轮</div>
<script type="text/javascript">
<!--
var o = document.getElementById('odiv');
if(/*@cc_on!@*/0){ //IE
o.onmousewheel = function(){
alert('IE Wheel!');
}
}else{ // other
o.addEventListener('DOMMouseScroll',function(){alert('FF Wheel')}, false);
}
//-->
</script>
</body>