<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script type="text/javascript">
function getMouseXY(e) {
var e = (!e) ? window.event : e;
var posX = 0;
var posY = 0;
var posScroll = 0;
if (e.pageX || e.pageY) {
posX = e.pageX;
posY = e.pageY;
posScroll = document.documentElement.scrollTop;
}
else if (e.clientX || e.clientY) {
if (document.body.scrollLeft || document.body.scrollTop) {
posX = e.clientX + document.body.scrollLeft;
posY = e.clientY + document.body.scrollTop;
posScroll = document.body.scrollTop;
}
else {
posX = e.clientX + document.documentElement.scrollLeft;
posY = e.clientY + document.documentElement.scrollTop;
posScroll = document.documentElement.scrollTop;
}
}
document.getElementById("mousePosition").innerHTML = "x: " + posX + "\ny: " + posY;
}
document.onmousemove = getMouseXY;
</script>
<style type="text/css"></style>
</head>
<body>
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<div id="mousePosition"></div>
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
</body>
</html>