topical media & game development
mobile-query-three-tmp-selenium-php-test-mouse.htm / htm
<html>
<head>
<title>test mouse</title>
</head>
<body tabindex='1'>
move: <div id="moveCoord"></div>
click: <div id="clickCoord"></div>
<script>
var nmove = 0;
window.curMouseX = null;
window.curMouseY = null;
document.addEventListener('mousemove', function(event){
nmove += 1;
curMouseX = event.clientX;
curMouseY = event.clientY;
var text = 'mousemove x='+event.clientX+' y='+event.clientY;
document.getElementById('moveCoord').innerHTML = text;
})
// var nclick = 0;
// document.addEventListener('click', function(event){
// nclick += 1;
// lastEventX = event.clientX;
// var text = 'mouseclick x='+event.clientX+' y='+event.clientY;
// document.getElementById('clickCoord').innerHTML = text;
// })
</script>
</body>
</html>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.