本帖最后由 zlz0595 于 2010-08-28 11:48:35 编辑

解决方案 »

  1.   

    在firefox下显示e is undefined错误!
      

  2.   

    在调用的时候要传进去<script type="text/javascript">
    function get_m(e){
         e=e?e:window.event;
         alert(e.clientX);
    }
    </script>
    <a href="javascript:void(0)" onclick="get_m(event);">点我</a>
      

  3.   

    +<script type="text/javascript">
    function get_m(e){
         e = e || window.event;
         alert(e.clientX);
    }
    </script>
    <a href="javascript:void(0)" onclick="get_m(event);">点我</a>
      

  4.   


    谢谢,可以是可以了!但是为什么我看到别人都无需传event进去而且为什么一定要写event呢能帮忙解释一下不
      

  5.   

    写到html和写到js里是不一样的<a href="javascript:void(0)" onclick="get_m(event);">点我</a><a id="a" href="javascript:void(0)">点我</a>
    <script>
    document.getElementById("a").onclick = get_m;
    </script>