Mozilla中的事件需要有参数传递进去的,像这样
  <script type="text/javascript">
  //<![CDATA[
document.onmousemove = handlerMouseEvent;
function handlerMouseEvent(e)
{
var e=e||window.event;
var a=document.getElementById("demo");
a.innerHTML = "x:"+e.clientX+"y:"+e.clientY;
}
  //]]>
  </script>
  <body id="www.never-online.net">
<div id="demo"></div>
  </body>

解决方案 »

  1.   

    <script type="text/javascript">
      //<![CDATA[
    function foo(e)
    {
    e=window.event?e.srcElement:e.target;
    alert(e.value);
    }
      //]]>
      </script>
      <body id="www.never-online.net">
    <input value="点我" onclick="foo(event)"/>
      </body>
      

  2.   

    同样的在firefox中event.button也不支持呢,还有在IE中点鼠标左键时alert(event.button)=1
    但在opera中alert(event.button)=0,在firefox中根本不支持,至少我用firefox测试的时候它并不弹出提示筐
     这个是怎么回事呢
      

  3.   

    <script type="text/javascript">
      //<![CDATA[
    document.onclick = handlerMouseEvent
    function handlerMouseEvent(e)
    {
    e=e||window.event;
    alert(e.button);
    }
      //]]>
      </script>
      <body id="www.never-online.net">  </body>
      

  4.   

    上面用错事件了。用onmousedown触发...
      <script type="text/javascript">
      //<![CDATA[
    document.onmousedown = handlerMouseEvent
    function handlerMouseEvent(e)
    {
    e=e||window.event;
    alert(e.button);
    }
      //]]>
      </script>
      <body id="www.never-online.net">  </body>
      

  5.   

    另外,IE与FF中滚轮事件也不一样。如果你用的话,也要注意。IE:onmousewheel
    FF:DOMMouseScroll
      

  6.   

    上Mozilla的网站上,有参考资料,不过是英文的,呵呵http://community.csdn.net/Expert/topic/4881/4881793.xml?temp=.6523706http://www.mozilla.org/docs/web-developer/
      

  7.   

    哦,还有一点小问题,就是document.body.scrollLeft在IE和Opera中就有效,但在FF中就无效,
    怎么解决呀.
      

  8.   

    有效的,你自己看看吧...<DIV ID=oDiv STYLE="position:absolute; width:200px;
    height:100px; overflow:scroll"
    onclick=alert(this.scrollLeft)>
    <SPAN STYLE="width:250px">
    http://blog.csdn.net/blueDestiny,
    http://blog.never-online.net</SPAN></DIV>
    <div style="width:1300px;height:100%;border:1px solid #444" onclick="alert(document.body.scrollLeft)">a</div>
      

  9.   

    BlueDestiny(这回真的准备要改名字了...) ( ) 信誉:100  2006-07-24 02:26:00  
    02:26:00  ???????