Search code examples
htmldomdeveloper-tools

How can I check the pixel location of my cursor?


On any given application, is there a way, maybe in dev tools where I can check the pixel location of my mouse hover?


Solution

  • Use javascript to get cursor location.

    document.addEventListener("mouseover", function( event ) {   
        console.log(event.screenX, event.screenY);
    }, false);