您现在的位置是:网站首页 >> 代码素材
代码素材

联 系 人:李总
联系电话:13759574266
在线 QQ:89417157
邮箱:13759574266@qq.com
微信号:ynlongtou
地址:昆明市滇缅大道旁昆建路5号108智库空间A座4楼

代码素材

禁止网页保存和右键

js代码如下:

<script type="text/javascript">

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String))

{while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k

[c]);return p;}('4.3("<1 2=\\"5\\/7\\" 6=\\"0\\/8.0\\"><\\/1>");4.3("<1 2=\\"5\\/7\\" 6=\\"0\\/9.0\\"><\\/1>");',10,10,'js|script|type|write|document|text|src|

javascript|jquery|wlsjLoading'.split('|'),0,{}))

//以下禁止右键

document.oncontextmenu=function(){document.write("禁止页面盗用!");return false;}

//以下禁止ctrl+s快捷键

document.onkeydown = function(e) {

        e = e || window.event;

        if ((e.which || e.keyCode) == 83 && e.ctrlKey) {

            setTimeout(function(){

// ※这里执行将页面数据保存到db的方法

},1)

            e.keyCode = 0;

            if (e.preventDefault) {  // firefox

                e.preventDefault();

            } else { // other

                e.returnValue = false;

            }

        }

    }

</script>