firefox 好象不行的
ie下的也是event.clientX

解决方案 »

  1.   

    行的吧??我好象以前看过有人贴过一段能获得firefox下鼠标坐标的代码了
      

  2.   

    DOM Event ReferenceclientX Returns the horizontal position of the event. 
    clientY Returns the vertical position of the event. http://www.mozilla.org/docs/dom/domref/
    http://www.mozilla.org/docs/dom/domref.zip做Firefox必看
      

  3.   

    firefox里的clientX和IE下的好象有不同~~~~包括获得该属性~~~如果我要在某个元素里触发获得鼠标事件,在firefox  下,脚本是不是必须包含这样的语句块??document.getElementById(id).event之前我看到过一个在body 元素下通过mouseover获得鼠标坐标的代码段~~兼容IE和firefox
    但是我想用在非body 元素下却始终不成功~~
    各位前辈高人都说说话吧~~~郁闷死了~~想兼容一下IE和FF,真是难~~ 偶对DOM又比较生疏...
      

  4.   

    firefox下的事件驱动和IE下有所区别
    事件函数必须传递事件,你这个函数在IE下也是通不过的,screenX不是window对象的属性,是event的
    <script type="text/javascript">
    <!--
    function alertX(e)
    {
     e = e || window.event;
     alert(e.screenX)
    }
    -->
    </script>
    <div onMouseOver="alertX(event)">getX</div>
      

  5.   

    e = e || window.event;这种的用法是什么意思呢?有没有详细解说ie和firefox事件驱动的文章?我想认真看看.
      

  6.   

    e = e || window.event
    =>
    e = e ? e : window.event;你看下fason这篇
    http://community.csdn.net/Expert/topic/3673/3673363.xml?temp=.9517328