javascript get cursor position without event

Solutions on MaxInterview for javascript get cursor position without event by the best coders in the world

showing results for - "javascript get cursor position without event"
Michele
08 Aug 2018
1var Cursor_X;
2var Cursor_Y;
3document.addEventListener('mousemove', onMouseUpdate, false);
4document.addEventListener('mouseenter', onMouseUpdate, false);
5function onMouseUpdate(e){
6    Cursor_X = e.pageX;
7    Cursor_Y = e.pageY;
8}
similar questions