js中如何禁止滚轮的单击?
来源:百度知道 编辑:UC知道 时间:2024/07/02 10:37:24
监听鼠标down事件,如果是event.button==4,表示是鼠标滚轮单击
<input type ="textfield" onmousedown="test();"/>
<script type="text/javascript">
function test(){
if (event.button == 4){
}
}
</script>
UC知道是一部内容开放、自由的互动网络百科全书
客观、专业、权威的知识性百科全书
来源:百度知道 编辑:UC知道 时间:2024/07/02 10:37:24
监听鼠标down事件,如果是event.button==4,表示是鼠标滚轮单击
<input type ="textfield" onmousedown="test();"/>
<script type="text/javascript">
function test(){
if (event.button == 4){
}
}
</script>