0

Mousse coordinate

How can I have mouse coordinate in javascript ? only with javascript.

31st Mar 2019, 1:14 PM
Samuel STEF
Samuel STEF - avatar
8 Antworten
+ 2
The listener is document.mouseover
31st Mar 2019, 3:16 PM
Gordon
Gordon - avatar
0
With any mouse event: onmousemove = function(event) { event.clientX // X on screen event.clientY // Y on screen event.pageX // X on the page event.pageY // Y on the page }
31st Mar 2019, 1:29 PM
voidneo
0
Thanks, and how can I do without click, Just gliss mouse on the screen.
31st Mar 2019, 1:34 PM
Samuel STEF
Samuel STEF - avatar
0
You mean by just moving the mouse around?
31st Mar 2019, 1:39 PM
voidneo
0
Yes
31st Mar 2019, 1:40 PM
Samuel STEF
Samuel STEF - avatar
0
And did you read the example I posted?
31st Mar 2019, 1:40 PM
voidneo
0
I read it, but i work on Phone. Maybe this is different
31st Mar 2019, 1:41 PM
Samuel STEF
Samuel STEF - avatar
0
Try using touch events, touchstart, touchmove, and touchend? Not sure about the last one
31st Mar 2019, 1:52 PM
voidneo