HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p onmousemove="myFunction(event)">Move cursor anywhere within this paragraph</p> <p id="point"></p> <script> function myFunction(e){ var xCoords = e.pageX; var yCoords = e.pageY; var result = "X coords = "+xCoords+" ,Y coords = "+yCoords; document.getElementById("point").innerHTML = result; } </script> </body> </html>
OUTPUT
×

Save as Private