Last active
August 29, 2015 14:13
-
-
Save nashingofteeth/3b154f76388afcf25192 to your computer and use it in GitHub Desktop.
get cursor position
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("mousemove", function(event) { | |
mouseX = event.pageX; | |
mouseY = event.pageY; | |
document.body.innerHTML = mouseX + " " + mouseY; | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment