document.oncontextmenu=function(){return false;};
把这句去掉

解决方案 »

  1.   

    我自己修改成功了,谢谢zhaoxiaoyang帮忙
    大家帮忙看看还有什么要改进的地方//鼠标手势JS代码来自http://bbs.blueidea.com/viewthread.php?tid=1590928,by myhyli
    document.onmousedown=initMotion;
    document.onmousemove=startMotion;
    document.onmouseup=endMotion;var sensitive=10;
    var lastX;
    var lastY;
    var isDown=false;
    var motionList=[];
    var maxMotionLength=5;
    var lastMotion=null;var actionList=
    {
    "↑":function(){document.body.scrollTop-=document.body.clientHeight*0.875},
    "↓":function(){document.body.scrollTop+=document.body.clientHeight*0.875},
    "←":function(){history.go(-1)},
    "→":function(){history.go(1)},
    "↓,←":function(){window.open(pre,"_self")},
    "↓,→":function(){window.open(next,"_self")},
    "→,↑":function(){scrollTo(0,0)},
    "→,↓":function(){scrollTo(0,document.body.scrollHeight);}
    };function initMotion(){
    if(event.button==2)
    {
    lastX=event.clientX+document.body.scrollLeft;
    lastY=event.clientY+document.body.scrollTop;
    isDown=true;
    motionList=[];
    lastMotion=null;
    }
    }function startMotion(){
    var currentMotion=null;
    if(isDown==true){
    if(event.clientX+document.body.scrollLeft-lastX>sensitive){
    currentMotion="→";
    }
    else if(event.clientX+document.body.scrollLeft-lastX<sensitive*-1){
    currentMotion="←";
    }
    else if(event.clientY+document.body.scrollTop-lastY>sensitive){
    currentMotion="↓";
    }
    else if(event.clientY+document.body.scrollTop-lastY<sensitive*-1){
    currentMotion="↑";
    }
    if(currentMotion!=null){
    document.oncontextmenu=function(){return false;};//这里屏蔽右键菜单
    lastX=event.clientX+document.body.scrollLeft;
    lastY=event.clientY+document.body.scrollTop;
    }
    if(currentMotion!=null && motionList.length==maxMotionLength && motionList[motionList.length-1]!=currentMotion){
    motionList=[];
    lastMotion=currentMotion;
    }
    else if(currentMotion!=null && (motionList.length==0 || motionList[motionList.length-1]!=currentMotion) && lastMotion!=currentMotion){
    motionList[motionList.length]=currentMotion;
    lastMotion=currentMotion;
    }
    window.status="鼠标手势:"+motionList;
    }
    }function endMotion(){
    if(isDown==true){
    isDown=false;
    var currentAction=actionList[motionList.toString()];
    if(currentAction!=null){
    currentAction();
    }
    window.status="";
    }
    document.oncontextmenu={return ture;};//这里解除屏蔽
    }
      

  2.   

    没改成功....
    没注意Maxthon的鼠标手势打开了,我还以为修改成功了....