你的左上角为0,0吗.如果是那么就好办了.这点的坐标是(Screen.width,Screen.height)

解决方案 »

  1.   

    <img src=killerj.jpg id=image1 style="position:absolute;top:100px;left:100px;"
    onmousedown=hoho(window.event.x,window.event.y)>
    <script>
    function hoho(x,y){
    x=x-parseInt(document.getElementById("image1").style.left);
    y=y-parseInt(document.getElementById("image1").style.top);
    alert("x="+x+"\n"+"y="+y);
    }
    </script>
      

  2.   

    <img src="a.gif" width=1500 height=1000 onclick="alert(' x:'+event.offsetX+'\n y:'+event.offsetY)">
      

  3.   

    cuixiping(无心) 的回答太对了,我也一直在找这个答案,快给他揭帖加分呀!!!!