x,y和clientX,clientY有什么区别

wangxj0600 2002-11-07 03:14:45
x,y和clientX,clientY有什么区别,我看了msdn上的:
clientX:Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.

X:Sets or retrieves the x-coordinate, in pixels, of the mouse pointer's position relative to the parent element.不过我现在再一个位置固定的div(left=20)中为什么x和clientx的值一直是一样的?
...全文
52 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ChinaPcFan 2002-11-07
  • 打赏
  • 举报
回复
我也问过,没得到解答,直到现在都没搞懂,期待高手们的解答!

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧