Answers for "javascript get cursor position without event"

0

javascript get cursor position without event

var Cursor_X;
var Cursor_Y;
document.addEventListener('mousemove', onMouseUpdate, false);
document.addEventListener('mouseenter', onMouseUpdate, false);
function onMouseUpdate(e){
    Cursor_X = e.pageX;
    Cursor_Y = e.pageY;
}
Posted by: Guest on February-19-2021

Code answers related to "javascript get cursor position without event"

Code answers related to "Javascript"

Browse Popular Code Answers by Language