Var output = document. Definition and Usage The pageX property returns the document relative X coordinate of the mouse pointer when a mouse event occurs. JavaScript Code is given below, clientX and clientY property returns the horizontal and vertical coordinates of the mouse cursor which are then displayed inside the paragraph element with id output. In JavaScript, two properties, clientX and clientY, are utilized for tracking a mouse position in the visible area of the browser. Mouse event is an event which gets generate when mouse interacts with html elements. Get Mouse Cursor Position in Pixels using JavaScript The following article provides an outline on JavaScript Mouse Events.
0 Comments
Leave a Reply. |