JS - 禁止右键等代码

js 代码

function stop(){ 
        return false; 
    } 
    document.oncontextmenu = stop;//禁止右键
    document.oncopy = stop;//禁止复制
    document.onselectstart = stop;//禁止选取
    document.onkeydown = KeyPress;
    function  KeyPress(num){
        var keycode = event.keyCode;
        if(keycode == 8)//禁止退格健
        {
            event.keyCode = 0;
            return;
        }
        if(keycode >= 112 && keycode <= 123)//禁止f1-f12
        {
            event.keyCode = 0 ;
            event.returnValue = false;
            return;
        }
    }

  翻  牌  子