Home >Web Front-end >JS Tutorial >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
Related free learning recommendations:javascript
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!