谁来讲解一下这些。

BeRush 2006-07-26 11:30:58
x
offsetX
offsetLeft
pixelLeft
clientX
看了都烦,哪个场合该用哪个。。。
...全文
165 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
chszs 2006-07-27
  • 打赏
  • 举报
回复
OffsetX 属性:得到鼠标点击时的鼠标x横坐标
offsetLeft 属性:返回相对于版面或父节点的左偏移量
pixelLeft 属性:设置或返回对象左边的象素点距
clientX 属性:设置或返回相对于 从窗口的鼠标指针的x轴坐标值,包括滚动条或装饰条在内.
WuCountry 2006-07-26
  • 打赏
  • 举报
回复
找本参考书:
这些都是Event的参数,但一些只在IE4.0+上有用。
clientX X location in a window
x X location in a positioned item
offsetX X location in a container
screenX X location in the screen
以上还有一个相对应的Y。
还有好几个:
shiftKey Keyboard modifier keys
srcElement Element the event was targeted to
type Type of event that occurred
wheelDelta The distance the wheel button rolled
keyCode Keyboard key that caused the event
button Mouse button that caused the event
找本书!
Inside JavaScript
By Steven Holzner
Publisher : New Riders Publishing
Pub Date : August 31, 2002
ISBN : 0-7357-1285-9
Pages : 1100







  • 打赏
  • 举报
回复
你用google查一下 dhtml 图解

有图的,一看就理解了
zhuangyan2004 2006-07-26
  • 打赏
  • 举报
回复
不知道
BeRush 2006-07-26
  • 打赏
  • 举报
回复
还有 position:relaive , absolute 这两个的区别。

87,902

社区成员

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

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