开发者

Cross domain iframe position

开发者 https://www.devze.com 2023-01-29 06:40 出处:网络
I\'m trying to find an easy way to get an external iframe\'s absolute position within the page.What I\'m looking for is 开发者_Go百科something similar to the following:

I'm trying to find an easy way to get an external iframe's absolute position within the page. What I'm looking for is 开发者_Go百科something similar to the following:

$(window.parent.document).find("#iframe").position().top

but that works cross domain. Is window.postMessage function the only/best way to solve this or is there a simpler way?

0

精彩评论

暂无评论...
验证码 换一张
取 消