<html><body onmousemove="f()">
<INPUT id=aa>
<Script>
function f(){
aa.value="x:"+window.event.x+" y:"+window.event.y;
}
</Script>
</body></html>
<INPUT id=aa>
<Script>
function f(){
aa.value="x:"+window.event.x+" y:"+window.event.y;
}
</Script>
</body></html>
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function document.onmousemove(){
var el=document.getElementById("showPos");
el.style.left=event.clientX+10;
el.style.top=event.clientY;
el.innerHTML="X:"+event.clientX+"<br>Y:"+event.clientY;}
</script>
<div id='showPos' border=1 style='POSITION:absolute'>
</div>
</head>
<body></body>
</html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function document.onmousemove(){
var el=document.getElementById("showPos");
el.style.left=event.clientX+10;
el.style.top=event.clientY+document.body.scrollTop;//////<====改成这样
el.innerHTML="X:"+event.clientX+"<br>Y:"+event.clientY;}
</script>
<div id='showPos' border=1 style='POSITION:absolute'>
</div>
</head>
<body></body>
</html>