Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mouse position

function printMousePos(event) {
  document.body.textContent =
    "clientX: " + event.clientX +
    " - clientY: " + event.clientY;
}

document.addEventListener("click", printMousePos);
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mouse #position
ADD COMMENT
Topic
Name
4+2 =