jquery pageY attribute syntax
Action: pageY () attribute is the position of the mouse pointer with respect to the upper edge of the document. Linear module
Syntax: event.page
parameter:
parameter | description |
event | essential. The provisions of events to be used. The event parameters from the event binding function. |
Property Example jquery pageY
<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(document).mousemove(function(e){ $("span").text("X: " + e.pageX + ", Y: " + e.pageY); }); }); </script> </head> <body> <p>鼠标指针位于: <span></span></p> </body> </html>