Adam Khoury

Donate funds to show love and support

Click the button below to donate funds securely online. You can use your PayPal account or a credit card.

Your donations help free up my time to produce more content and assist in covering server costs. It's also a great way to say thanks for the content!

Application Configuration

Adam will be adding options here soon.

Read Mouse Coordinates Pointer Position Tutorial

Published :
Author :
Adam Khoury
Learn to sense mouse movement and read the user mouse coordinates on the screen as they move it around. Nice user interfaces and applications can be constructed using the mouse position to adjust elements on the page relative to the mouse position. <!DOCTYPE html> <html> <head> <script> function readMouseMove(e){ var result_x = document.getElementById('x_result'); var result_y = document.getElementById('y_result'); result_x.innerHTML = e.clientX; result_y.innerHTML = e.clientY; } document.onmousemove = readMouseMove; </script> </head> <body> <h1>Document that reads mouse movement</h1> <h2 id="x_result">0</h2> <h2 id="y_result">0</h2> </body> </html>