js屏蔽F12和右键代码

//屏蔽F12和右键  function click(e) { if (document.all) { if (event.button==2||event.button==3) { alert("你想干什么?"); οncοntextmenu='return false'; } } if (document.layers) { if ...
//屏蔽F12和右键
 function click(e) {
if (document.all) {
if (event.button==2||event.button==3) { alert("你想干什么?");
οncοntextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
οncοntextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.οnmοusedοwn=click;
document.oncontextmenu = new Function("return false;")
document.onkeydown =document.onkeyup = document.οnkeypress=function(){ 
if(window.event.keyCode == 123) { 
window.event.returnValue=false;
return(false); 
} 
}
//屏蔽F12和右键


  • 发表于 2021-04-17 06:28
  • 阅读 ( 363 )
  • 分类:互联网

0 条评论

请先 登录 后评论
小赵
小赵

704 篇文章

你可能感兴趣的文章

相关问题