martes, 17 de noviembre de 2009

Coordenadas del raton con Javascript

<html>

<head>

<script type="text/javascript">

function raton(e) {

x = e.clientX;

y = e.clientY;

document.getElementById('co').innerHTML = x+'-'+y;

}

</script>

</head>

<body onmousemove="raton(event)">

<p id="co"></p>

</body>

</html>