Skip to content

Instantly share code, notes, and snippets.

@AlexR1712
Created January 18, 2018 14:27
Show Gist options
  • Select an option

  • Save AlexR1712/21bef6dfcdb8c82e090e0d0296b48935 to your computer and use it in GitHub Desktop.

Select an option

Save AlexR1712/21bef6dfcdb8c82e090e0d0296b48935 to your computer and use it in GitHub Desktop.
print Mouse Position
function printMousePos(event) {
document.body.textContent =
"clientX: " + event.clientX +
" - clientY: " + event.clientY;
}
document.addEventListener("click", printMousePos);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment