showing results for - "javascript track mouse position"
Sabrina
14 Jan 2019
1<p>Click in the div element below to get the x (horizontal) and y (vertical) coordinates of the mouse pointer, when it is clicked.</p>
2
3<div onclick="showCoords(event)"><p id="demo"></p></div>
4
5<p><strong>Tip:</strong> Try to click different places in the div.</p>
6
7<script>
8function showCoords(event) {
9  var cX = event.clientX;
10  var sX = event.screenX;
11  var cY = event.clientY;
12  var sY = event.screenY;
13  var coords1 = "client - X: " + cX + ", Y coords: " + cY;
14  var coords2 = "screen - X: " + sX + ", Y coords: " + sY;
15  document.getElementById("demo").innerHTML = coords1 + "<br>" + coords2;
16}
17</script>
queries leading to this page
mouse position tracking javascriptget mouse positionget cursor location javascriptdom event javascript clientxget user mouse position javascriptjs get mousexjs mouse event get mouse positionget mouse position javascript event mousexcursor 27s position 28its x and y coordinates 29 jsget mouse position in jsget current mouse position in javascriptget position of mouse javascriptjavascript mouse positontypescript get mouse location from eventjs get mouse position in elementcurrent mouse position javascriptget position of mouse eventmouse position in javascriptfind mouse position javascriptget mouse event coordinatesget current mouse location javascriptcalculate the position of mouse on x axis javascriptjavascript get mouse coordinateshow to get the coordinates of mouse in jscapture x and y coordinates of mouseget coordinates of mouse javascriptjavascript position of cursorjavascript get mouse coordinatejavascript get current mouse locationjs how to get mouse positionupdate mouse location javascriptjavascript log mouse positionmousex javascriptget mouse position element javascripthjs mouse positionhow to get pointer position in javascript 5cget mouse pointer coords jsjavascript get mouse position without eventjavascript track mouse positionget mouse x and y javascriptfind mouse possition by jsjs get mouseposclientx property javascriptjavascript e clientxtrack cursor position javascriptget mouse position javascript in a divget mouse with jshow to have clientx and clienty return coordinates of a particular element jsmouse event listener javascript mouse coordinatesget mouse position javascript relative to elementhow to get the mouse position htmlget mouse coordinates javascripthtml javascript get mouse positionhow to get mouse location in javascripthow to get position of mouse in javascripthow to get mouse coordinates on jsjs get mouse position on click event clientxjavascript get position of mouseget mouse position javascript in divjavascript get mouse posiitonknow the position of the mouse javascripttrack mouse jsget mouse position javascritjavascript html get current mouse positionhtml canvas get mouse positionshow mouse position on canvas jsget mouse position in element javascripthow to get the position of the mouse in javascriptmouse x position javascriptmouse coordinates javascriptclientx jsget mouse pos in hjavascriptjs get mouse position windowget mouse position canvasconsole log mouse positiontrack mouse event javascripthow to detect the position of the mouse in javascriptjs get mouse cordshow to get mouse postion with javascriptjavascript get mouse position on pagetrack mouse pointer jsjavascript get mouse position w3schoolshow to get the current mouse position in javascriptget mouse position on screenhow to get the dom position of mouse in javascriptget mouse coordinates jsevent clientx propertiesclient x and y in reacttrack mouse pointer location jsjs have position of mouseget position mouse is on the element jsjavascript clientxget mouse position on screen javascriptget mouse position on clickget position cursor javascriptget mouse x position javascriptjavascript mouse x and ygive clientx and clienty to div in javascriptjavascript get position mouseget mouse current position javascriptmouseposition jsmouse x mouse y java scriptjavascript get co ordinates of mousejavascript track mouse pointehow to get the mouse position using javascriptget mouse position jsposition of mouse javascriptjavascript track mouse pointerget position of element javascriptevent x javascripthow to get mouse x and y in javascriptpos x and y in javascriptwant to get mouse position in jsget x y position of mouse javascripthow to make track the position of the mouse in javascriptjavascript position cursorgettin mouse position jsget x and y position of mouse javascriptget exact mouse position javascriptjavascript show current mouse positionget mousex in jsaccess mouse position javascriptclientx in javascriptjavascript get mouse position in element on mousemoveclientx and clienty in javascriptjs geting the mouse positionjavascript mouseevent positionjavascript get mouselocationget the mouse position javascriptjavascritpt get mouse positionjavascript position of mousejavascript current mouse positionjs event positionjavascript find the location of the mousemouse click coordinates javascriptjs mouse positiontrack mouse position javascriptclientx menu manager resetmouse position javascript htmljavascript get position of mouse on pageconsole log mouse positionjavascrip current mouse positionmouse x javascripthow to get mousemove position in javascriptdocument get mouse positionjavascript get mouse locationjavascript mouse position on htmls pagecords input javascriptjs mouse coordinates get mouse positionevent mousexhow to track mouse position in javascripttooltip positioning event jsevent clientxcursor position in javascriptget mouse pointer position in javascripthow to find the mouse position in javascriptjs get mouse coordinatesjavascript get mouse position on mouse movehow to get mouse click position in javascriptget mouse position div javascriptgett mouse position jsmouse coordinates in javascriptget position of mouse jsmouse click position javascriptmouse position javascriptjs detect mouse positionposition mouse jsjavascritp get mouse position relatiev to an elemtjavascript mousemove get mouse positionmouse cursor position javascripthow to find position of mouse pointer in javascriptjavascript get pointer position addeventlistenerjs track mouse positionjavascript get mouse poiter positionposition mouse javascriptwindow get mouse positionhow to get mouse position jsjs log click locationhow to get mouse position jsavascirptou mouse mouve get positionget mouse click coordinates javascriptjs track mouse locationhow to get the mouse position in js 3fmouse x and y javascriptclientx in javascripttjs get current mouse positionhow to access clientxget current mouse position javascriptjavascript get mouse position in divjs events mouse xjavascript how to get mouse positionhow to print mouse position in javascriptjquery clientxlisten to mouse location jscheck mouse position javascriptmouse in and out javascripthow to get mouse position in the browser jsget the current mouse position javascripttake mouse position javascriptjs detect mouse coordinatesjavascript mouse positionget curser axis in jsget mouse location jsjs get cordinates of the mousejs get mouse postitionget position of mouse with javascriptget mouse position javasxcripthtml how to get mouse positiontracking mouse position javascripthow to get the cursor pointer coordinates using jshtml get current mouse positionget mouse pos in javascripttrack javascript mouse eventposition of mouse in html javascriptget element mouse position javascriptmouse current position javascriptjs get pointer positionjavascript get mouse position on divget y position of mouse javascripthow to get mouse position javascripthow to get mouse in javascriptjs mouse pointer positionhow to get the mouse position in javascriptwrite text on cursor click using javascript event clientxget mouse pos in jsjava scrpt get mouse positionposition of mouse jsjs getmouseposmousex jsjavascript e xyjs client posget mouse position of page in javascriptget mouse position in javascriptfind mouse coordinates jsget position mouse javascriptget x and y of mouse javascripthow to get mouse position in an elementjs get mouseget position mouse element javascriptjavascript get mouse x and yhow to get the correct mouse position in javascriptclientx of element in jsget position of mouse in jsdetect mouse position javascriptmouse x y javascriptget div from mouse position javascriptevent clientx javascriptjs get mouse position in windowget the mouse x ywhat is mouse x and y javascripthow to get current mouse position in javascriptget mouse position htmljavascript get mouse position in elementjs get mouse positionjavascript get x position of mousehow to tie e client x and y to coordinates in cssjavascript display mouse coordinatesposition of mouse in jsjs mouse xjs pointer positionget mouse coordinatesjavascript get element at mouse positionhow to know your pointer coordinates on html pageget element by mouse position javascriptclientx and clienty in jsget position of mouse in button jsmouse offset javascriptjavascript get exact mouse positionjs get mouse datahow to control mouse coordinates in javascriptgetr mouse position jsjs get mouse movementhow to find mouse position in javascriptjavascript get mouse position changegetting mouse position javascriptget mouse coordinates in javascriptjavascript get mousepositonjs get mouse coordsget mouse position function javascriptjavascript track mouse positionhow to know the mouse place cordinats jsconsole log position of mouse pointer in javascripthow to find mouse coordinates in javascriptevent get mouse positionget current position of mouse javascriptjs get element at mouse poshow to get mouse coordinates with javascriptget mouse location javascriptdocument js get mouse positionjavascript how to get mouse x and yjavascript get element with mousehtml get mouse positionget pointer positionjavascript html get mouse positionjs get cursor position on documenttrack the mouse position with javascripthow to get mouse position on a div in javascriptget current mouse position jsjs mouse event positionprint coordinates in jsget mouse position javascript on mouse movejs getting mouse coords returning objecthow to get mouse position javascript htmltrack mouse position x and yhow to get the mouse coordinates in javascripthow to get x y mouse position in javascriptupdate mouse position javascriptget position of mouse codehs jsjavascript get current mouse positionmouse pos jsjavascript event target coordinatesjavascript client xfind mouse position javasciptget mouse position javascriptshow mouse pointer location below the pointer in jshow to read mouse position jsclientx javascriptjavascript get mouse positionhow to get access mouse on element in javascriptget position of mouse on element jsget location of mouse javascriptknow mouse location javascriptget javasccript mousemouse x and yget mouse pos jsget mouse event positionget pointer position on pagegetmousecoords javascriptjs get mouse position on mouse moveget mouse position on window javascriptmouse in mouse out javascriptget cursor position javascriptjavascript show mouse positionunity get mouse positionjs get mouse locationhow to get mouse position in jsjavascript get mouse click positiontest mouse y 2fx jsget mouse position from eventjavascript get pointer positionhow to get mouseposition in javascripthow to get mouse position in javascriptget mouse postiion javascriptjavascript detect mouse position javascript mouse lockationmouse coordinates htmlhow to detect mouse position in javascriptget div mouse position javascriptget mouse position in window javascriptmouse position jshow to get mouse coordinates in javascripthow to get the coodernate of the mouse in javascriptmouse click x y javascriptjs mousemove get mouse positionjs get position of mousehow to get mouse xy xoordinates in jsfind point of cursor javascriptevent target coordinates htmljs get mouse poshow to get the coordinates of the mouse in javascriptjavascript track mouse position