window.event.clientX
window.event.clientY

解决方案 »

  1.   

    <input type=button onclick="alert(window.event.clientX+':'+window.event.clientY);">
      

  2.   

    var isIE = document.all?true:false;
    if (!isIE) document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = getMousePosition;
    function getMousePosition(e) {
      
      if (!isIE) {
        _x = e.pageX;
        _y = e.pageY;
      }
      if (isIE) {
        _x = event.clientX ;
        _y = event.clientY ;
      }
      return true;
    }我想这个对你一定有用,我现在就用这个了