JavaScript-4.6鼠标事件监听,获取鼠标坐标window.event---ShinePans

it2025-09-30  61

<html> <head> <meta http-equiv="content-type" content="text/html" charset=GB2312"/> <title> 4.5 window.event应用 </title> <script> function body_onclick(){ alert("鼠标点击的坐标是\r\nx:"+event.x+",y:"+event.y); } </script> </head> <body style="overflow:auto;padding:0px;margin:0px;"οnclick="body_onclick();"> </body> </html>

获取鼠标的坐标

课连续点击

转载于:https://www.cnblogs.com/bhlsheji/p/4279075.html

相关资源:JavaScript宝典 第6版.part4.ra
最新回复(0)