禁止右键

document.onmousedown=function(ev){
	var ev=window.event||ev;
    if(ev.button==2){
        ev.returnValue=false;
        alert("右键被禁止啦!");
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_44088986/article/details/85994725