鼠标指针位置坐标
2012-03-26 19:11
423 查看
clientX 事件属性返回当事件被触发时鼠标指针向对于浏览器页面(或客户区)的水平坐标。 客户区指的是当前窗口。语法 event.clientX clientY 事件属性返回当事件被触发时鼠标指针向对于浏览器页面(客户区)的垂直坐标。 客户区指的是当前窗口。语法 event.clientY 下面的例子可显示出事件发生时鼠标指针的坐标: <html> <head> <script type="text/javascript"> function show_coords(event) { x=event.clientX y=event.clientY alert("X coords: " + x + ", Y coords: " + y) } </script> </head> <body onmousedown="show_coords(event)"> <p>Click in the document. An alert box will alert the x and y coordinates of the mouse pointer.</p> </body> </html>
相关文章推荐
- [求助]关于在状态栏显示自定义坐标系下鼠标指针所在位置坐标的问题
- 实时显示鼠标指针相对于浏览器X轴Y轴坐标位置
- CHtmlView中实时获取鼠标指针位置坐标
- C#在窗体中点击任意位置鼠标左键获得该点坐标
- delphi 获取鼠标当前位置的相对坐标
- jQuery获取当前鼠标相对位置坐标和点击图片跳转上一张或下一张功能
- WinAPI: GetCursorPos - 获取鼠标指针的当前位置
- JavaScript 获取鼠标点击位置坐标
- 用C语言在linux下获取鼠标指针的相对位置
- 【JS温故知新】之——给力的鼠标坐标位置获取
- 获取鼠标位置坐标
- JS获取鼠标坐标位置实例分析
- 实现在窗体内移动鼠标时,能够实时显示鼠标指针的位置
- JavaScript获取当前鼠标指针坐标
- MFC中状态栏显示鼠标坐标位置
- 【JS温故知新】之——给力的鼠标坐标位置获取
- 【Untiy&NGUI】判断鼠标坐标位置与实际屏幕坐标的比较
- MFC 获取picture控件的鼠标点击坐标位置的方法
- WinAPI: SetCursorPos - 设置鼠标指针位置
- JS获取鼠标的坐标和滚动条的位置