asp.net页面在浏览器查看后,右击会出现原始的复制、粘贴等快捷菜单。我想要去掉它,怎么办?请高手指点!

解决方案 »

  1.   

       if ( event.button == 0) {       //屏蔽 鼠标右键
                   return false;
               }
      

  2.   


     function KeyDown(e) {
                if ( event.button == 0) {       //屏蔽 鼠标右键
                   return false;
                }
            }
            document.oncontextmenu = KeyDown;
            document.onkeydown = function() { KeyDown() };
      

  3.   

    function block(oEvent){
       if(window.event)
        oEvent=window.event;
       if(oEvent.button==2)
        alert("鼠标右键不可用");
      }
      

  4.   

    加上function KeyDown(e) {
                if ( event.button == 0) {       //屏蔽 鼠标右键
                   return false;
                }
            }
            document.oncontextmenu = KeyDown;
            document.onkeydown = function() { KeyDown() };
    后别的地方不出现了,可是在加载的xheditor编辑器里面仍会出现快捷方式,这是怎么回事?
      

  5.   

    if ( event.button == 0) 

      return false;
    }
      

  6.   

    项目在用的 给LZ
    /*
     * 説明:Client危険な操作を禁止する
     */
    function forbidUserDo()
    {
        //RightMouseを禁止
        $(document).bind("contextmenu",function(e){
            return false;
        });    $(document).bind("ondragstart",function(e){
            return false;
        });
        $(document).bind("onselectstart",function(e){
            return false;
        });
        $(document).bind("onselect",function(e){
            document.selection.empty();
            return false;
        });
        $(document).bind("oncopy",function(e){
            document.selection.empty();
        });
        $(document).bind("onbeforecopy",function(e){
            return false;
        });
        $(document).bind("onmouseup",function(e){
            document.selection.empty();
        });
        
        window.moveTo(0,0);
        window.resizeTo(screen.width,screen.height)
        
        
        //ボタン「back」を禁止する
    window.history.forward(1);  

    forbidUserDo();