怎么得到鼠标点击在线图片的位置坐标?
我要在这个位置插入图片或者文字
------解决方案-------------------- <script>
function move(){
document.getElementById( "mouse ").innerHTML=window.event.clientX+ ": "+window.event.clientY;
}
</script>
<body onMouseMove= "move(); ">
<div id= "mouse "> </div>
</body>
------解决方案--------------------用Rico的API吧,方便很多
<img id=imgObj src= "kdsfldsfl.gif " onclick= "doClick(); " > </img>
<script language=JavaScript>
function doClick()
{
var imgPos = RicoUtil.toDocumentPosition( "mgObj ")
var xPos = imgPos.x;
var yPos = imgPos.y;
}
</script>