//Disable right button, text selection function, copy button
$(document).bind("contextmenu",function(){return false;});
$(document).bind(" select start",function(){return false ;});
$(document).keydown(function(){return key(arguments[0])}); //Prompt warning when pressing key function key(e){ var keynum; if(window.event){ keynum = e.keyCode; // IE }else if(e.which){ keynum = e.which; // Netscape/Firefox/Opera } if(keynum == 17){ alert("No copying!"); return false ; } } //Disable right button, text selection function, copy button $(document).bind("contextmenu",function(){return false;});
$(document).bind("selectstart",function(){return false;});
$(document).keydown(function(){return key(arguments[0])}); //Prompt warning function when pressing key key(e){ var keynum; if(window.event) // IE { keynum = e.keyCode; } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which; } if(keynum == 17){ alert("No copying content!");return false;} } //Block the right mouse button, Ctrl+N, Shift+F10, F11, F5 refresh, backspace
function document.oncontextmenu(){event.returnValue=false;}//Block the right mouse button
function window.onhelp(){return false} //Block F1 help
function document.onkeydown(){
if((window.event.altKey) &&
((window.event.keyCode==37)|| //Shield Alt+direction keys←
(window.event.keyCode==39))){ //Shield Alt+direction keys →
alert("You are not allowed to use ALT+direction Key forward or backward webpage!");
event.returnValue=false;
} if((event.keyCode==8)|| //Block backspace delete key
(event.keyCode==116)|| //Block F5 refresh key
(event.ctrlKey && event.keyCode==82)){ //Ctrl+R
event.keyCode=0;
event.returnValue=false;
}
if(event.keyCode==122){event.keyCode=0;event.returnValue=false;} //屏蔽F11
if(event.ctrlKey && event.keyCode==78)event.returnValue=false; //屏蔽Ctrl+n
if(event.shiftKey && event.keyCode==121)event.returnValue=false; //屏蔽shift+F10
if(window.event.srcElement.tagName=="A" && window.event.shiftKey)
window.event.returnValue=false; //屏蔽shift加鼠标左键新开一网页
if((window.event.altKey)&&(window.event.keyCode==115)){ //屏蔽Alt+F4
window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");
return false;
}
}
jQuery disables the implementation of right-click, text selection, and copy buttons
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326063032&siteId=291194637
Ranking