禁止网页右键、选择、F12操作

js代码如下:

<script>
    //禁止右键
    $(document).bind("contextmenu",function(){return false;});
    //禁止选择
    $(document).bind("selectstart",function(){return false;});
    //禁止F12
    document.onkeydown = function(){
        if(window.event && window.event.keyCode == 123) {
            event.keyCode = 0;
            event.returnValue = false;
        }
       }
</script>

留下评论