我用的是prototype.js 1.6.0,下面是js部分的代码:
document.observe( "click", function(event){
event.stop();
if( !Event.isLeftClick(event) ){
alert("right click!");
}
});
在Mozilla中是有用的,在IE中就无效了,难道prototype的cross-browser特性有bug,还是我的代码有问题呢?在线等
document.observe( "click", function(event){
event.stop();
if( !Event.isLeftClick(event) ){
alert("right click!");
}
});
在Mozilla中是有用的,在IE中就无效了,难道prototype的cross-browser特性有bug,还是我的代码有问题呢?在线等
用其它代码是可以的
IE:
document.body.oncontextmenu = function () {return false;}