Javascript 在Firefox中禁用鼠标中键点击和拖动功能

Javascript 在Firefox中禁用鼠标中键点击和拖动功能,javascript,jquery,function,firefox,mousewheel,Javascript,Jquery,Function,Firefox,Mousewheel,我想对整个html文档禁用鼠标中键点击和拖动功能。我试过这个: html: <body onmousedown="aabb(this.event);"> 它在Chrome和IE中运行良好,但Firefox显然不知道如何处理它。 您有什么解决方案吗?您定义了e,但使用了event HTML: 但是既然您使用的是jQuery,为什么不使用jQuery的方式呢 $(document.body).on("mousedown", function (e) { e.preventDefault

我想对整个html文档禁用鼠标中键点击和拖动功能。我试过这个:

html:

<body onmousedown="aabb(this.event);">
它在Chrome和IE中运行良好,但Firefox显然不知道如何处理它。
您有什么解决方案吗?

您定义了e,但使用了event

HTML:

但是既然您使用的是jQuery,为什么不使用jQuery的方式呢

$(document.body).on("mousedown", function (e) { e.preventDefault(); } );
您尝试过.off()或unbind()吗


OP想要阻止默认操作,而不是他附加的处理程序。实际上,我不知道,在我的情况下,你能给我举个例子吗?你为什么要阻止鼠标中键?
<body onmousedown="aabb(event);">
function aabb (event) { 
    event.preventDefault(); 
}
$(document.body).on("mousedown", function (e) { e.preventDefault(); } );