http://www.microsoftfaqs.com/msg/1517612.aspx这儿有个介绍,我看得不是很懂:You seem to misunderstand how offsetX and offsetY work. They return coordinates of the element relative to its parent element, as specified in offsetParent. You add offsetX and offsetY off the parent element, then off the parent's parent and so on, until you reach the element with offsetParent=null (normally, that would be the document). At this point, you have the coordinates of the original element relative to its containing document. If this containing document is in a frame, then your coordinates are relative to this frame.控件里面的点位置 换算成 frame 的点位置,再用 document -> elementFromPoint 获取? document 里面点的坐标 应该是 frame 左上角 0,0 开始吗?
coordinates of the element relative to its parent element, as specified
in offsetParent. You add offsetX and offsetY off the parent element,
then off the parent's parent and so on, until you reach the element with
offsetParent=null (normally, that would be the document). At this point,
you have the coordinates of the original element relative to its
containing document. If this containing document is in a frame, then
your coordinates are relative to this frame.控件里面的点位置 换算成 frame 的点位置,再用 document -> elementFromPoint 获取?
document 里面点的坐标 应该是 frame 左上角 0,0 开始吗?