<body onmousemove=setStatus()>
<div id=c style=cursor:default;position:absolute;top:200;left:400;color:red>●</div>
<script>
var cX=c.style.pixelLeft+c.clientWidth/2
var cY=c.style.pixelTop+c.clientHeight/2
function setStatus(){
with(window.event){
with(Math)status="距离:"+round(sqrt(pow(clientX-cX,2)+pow(clientY-cY,2)))+" 角度:"+round((2-atan2(clientY-cY,clientX-cX)/PI)*180%360)
}
}
</script>