禁止複製和右鍵的jquery function
//禁止右鍵,選取複製等等
$(window).on("contextmenu", function(e) {e.preventDefault();})
$(window).on("keydown", function(e) {if(e.keyCode == 123)e.preventDefault();})
disableSelection(document.body);
//禁止選取網頁內容及複製
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //For IE
target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //For Firefox
target.style.MozUserSelect="none"
else //All other route (For Opera)
target.onmousedown=function(){return false}
target.style.cursor = "default"
}