<script type="text/javascript">
document.onmousedown=function leftclick(){
 if (event.button==1) {//2为右键
   alert('你点击的是左键!');   
 }

</script>

解决方案 »

  1.   

    function _keydown()
    {
      if ((event.ctrlKey)&&(event.keyCode==65))
      {
           event.returnValue=false;
      }
      if(event.keyCode == 8)
      {
    event.keyCode    = 0;
            event.returnValue= false;
      }
    }<body onkeydown="_keydown();">屏蔽ctrl+a
      

  2.   

    <script language=javascript>
    document.oncopy=function() {return false;}
    document.onselectstart=function() {return false;}
    </script>总的来说,只能防君子,不能防“小人”
      

  3.   

    <script language="javascript">
    <!--
      document.onmonusedown=function(){return false;}
    //-->
    </script>
      

  4.   

    根据HTTP协议,大哥你几乎没有办法能阻止拷贝。
    ---------------------------------------
    我设计的服务器已经支持CGI了:
    http://osdev.dec.cn:8080/gb1/index.pl
      

  5.   

    加上这个<body oncontextmenu="return false;" onselectstart="return false;">
      

  6.   

    举个例子:
    <body oncontextmenu="return false;" onselectstart="return false;">
    这样在IE里确实是没有了右键菜单也不能选中, 可以我不能IE的下拉菜单->查看->源文件
    里看你的源代码?
    或者我装一个不支持 oncontextmenu 的浏览器(好象NS就不支持)这个方法就无效了.
      

  7.   

    呵呵,人在江湖~~无奈的人生,奋斗中……顺便提一下,NS(我的版本7.1)支持oncontextmenu,但不支持onselectstart
      

  8.   

    function disableRightClick(e)
    {
      var message = " 够 曰 的";
      
      if(!document.rightClickDisabled) // initialize
      {
        if(document.layers) 
        {
          document.captureEvents(Event.MOUSEDOWN);
          document.onmousedown = disableRightClick;
        }
        else document.oncontextmenu = disableRightClick;
        return document.rightClickDisabled = true;
      }
      if(document.layers || (document.getElementById && !document.all))
      {
        if (e.which==2||e.which==3)
        {
          alert(message);
          return false;
        }
      }
      else
      {
        alert(message);
        return false;
      }
    }
    disableRightClick();</script>