<body oncontextmenu="return false;">

解决方案 »

  1.   


    很短的一段代码实现的右键屏蔽: oncontextmenu=\"window.event.returnvalue=false\" javascript 只允许输入数字 onkeypress=\"if((event.keyCode<48)||(event.keyCode>57)){event.returnValue=false;}\" onblur 是控件在失去焦点的时候触发的事件<script language="JavaScript"> //锁鼠标右键和键盘CONTEXTMENU键 function click(e) { if (document.all) { if (event.button==2||event.button==3) { _disibledevent= new Function("return false;") </script>... 
      

  2.   

    你们给我编码我试了一下在html中ok.但在jsp中还是有点问题.2楼朋友能不能给我讲再清楚点谢谢!!!
      

  3.   


    那肯定是你什么地方写错了.
    JSP只是在服务器端执行的角本,
    最后返回给浏览器的都是HTML和JS文本.
      

  4.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <script language="JavaScript">
    window.onload =function(){

    }

    document.oncontextmenu = function(){
    return(false);
    }
    </script>
    <body>
    <a href="http://www.sina.com.cn" onclick="return(false);">http://www.sina.com.cn</a>
    </body>
    </html>