Javascript Mouse Position

How To Get Mouse Position Using Javascript

Javascript Mouse Coordinates

In This Javascript Tutorial we will see How To Get And Show The Cursor Coordinates On The Mouse Moving Event Or onClick And Display X And Y  Using JS Using Netbeans Editor .

Project Source Code:

<!DOCTYPE html>
        <title>Javascript - Mouse Position</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <p id="position">Test</p>

                var x = event.clientX;
                var y = event.clientY;
                document.getElementById('position').innerHTML = " X = "+ x +"][ Y = "+ y;