about 9 years ago
By using jquery event.pageX and event.pageY we find the coordinate of mouse. The PageX event shows the edges from left and the PageY event shows the edges from top.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>event.pageX demo</title> <style> body { background-color: #eef; } div { padding: 20px; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> </head> <body> <div id="log"></div> <script> $( document ).on( "mousemove", function( event ) { $( "#log" ).text( "pageX: " + event.pageX + ", pageY: " + event.pageY ); }); </script> </body> </html>
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)