示例您可以尝试运行以下代码来了解如何实现pagey javascript 中的鼠标事件。
<!doctype html><html> <body> <p onclick="coordsfunc(event)">click here to get the x (horizontal) and y (vertical) coordinates of the mouse pointer.</p> <script> function coordsfunc(event) { var x_coord = event.pagex; var y_coord = event.pagey; var xycoords = "x coords= " + x_coord + ", y coords= " + y_coord; document.write(xycoords); } </script> </body></html>
以上就是在javascript中,pagey鼠标事件的作用是什么?的详细内容。
