网页防扒

所谓防火防盗防大佬,虽然我们提倡开源,但是有时也会用到“网页防扒”,在https://www.sojson.com 被挡了一会感觉很蓝瘦,顺便研究了下如何“防扒”,代码如下:

document.onkeydown=function(){
    var e=window.event||arguments[0];
    if(e.keyCode==123){
        return false;
    }else if((e.ctrlKey)&&(e.shiftKey)&&(e.keyCode==73)){
        return false;
    }
};
document.oncontextmenu=function(){
    return false;
}

  转载请注明: XMwarrior 网页防扒

  目录