<script type="text/javascript">
addEventListener('mousemove', mousemove, true);
function mousemove(event){
 var el = document.getElementById('number');
 el.innerHTML = event.pageX;
}
</script>
<center>
マウスのX座標は<span id="number">0</span>です。
</center>