wadim,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<script>
document.onmousemove = function (e) {
e = e || window.event;
document.getElementById('mouseX').value = e.pageX;
document.getElementById('mouseY').value = e.pageY;
}
</script>
</head>
<body>
<input id="mouseX">
<input id="mouseY">
</body>
</html>