<body onmousemove="DisplayMp(event)">
当前鼠标坐标为:
X:<span id="mp_x"></span>
Y:<span id="mp_y"></span>
screen width: <span id="mp_width"></span>
screen height: <span id="mp_hight"></span>
</body>
<script type="text/javascript">
function DisplayMp(event)
{
document.getElementById("mp_x").innerHTML = event.clientX +"px";
document.getElementById("mp_y").innerHTML = event.clientY +"px";
document.getElementById("mp_width").innerHTML = screen.width;
document.getElementById("mp_hight").innerHTML = screen.height;
} // end of function DisplayMp
</script>