Home > Article > Web Front-end > How to get mouse position with jQuery
The jQuery method of obtaining the mouse position: first bind pageX and pageY to the event; then display the position information of X and Y in [
]; then save the file to view the display; finally in the document Just click the location information displayed after clicking the cursor.
The operating environment of this tutorial: windows7 system, jquery3.2.1 version, Dell G3 computer.
jQuery method of obtaining mouse position:
1, e.pageX and e.pageY
2 , pageX and pageY must be bound to events
##3. Get the position information of the X and Y axes when the cursor is clicked 4. Let the location information ofRelated free learning recommendations:javascript
(Video)The above is the detailed content of How to get mouse position with jQuery. For more information, please follow other related articles on the PHP Chinese website!