To “草尚菲”
去http://www.mozilla.org去下载Mozilla Firefox 1.0吧。哈!哈!

解决方案 »

  1.   

    e.which好像是检测键盘按键的,对鼠标键无能为力。
      

  2.   

    奇怪,mozilla下的事件很多失效
    <div onMouseDown="alert();" style="height:100px;width:200px;border:1px solid red;"> 也不行
      

  3.   

    谢谢,阿信,在IE下写惯了-_-!<body onmousedown="if(event.which==1)alert('hello');">
    mozilla下通过
      

  4.   

    Mozilla与IE在事件模型上略有差异<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> New Document </title>
    <meta name="Generator" content="EditPlus">
    <meta name="Author" content="Seagle.K">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="JavaScript">
    var ie = window.navigator.appVersion.indexOf('MSIE')==-1?false:true;
    window.document.onmousedown = function(e)
    {
    var e = ie?window.event:e;
    var b = ie?e.button:e.which;
    if (b == 1)
    {
    alert("Left Button");
    }
    }
    </script>
    </head>
    <body>
    </body>
    </html>