开发者

How do I get the current iframe location from within the iframe?

I've seen solutions like

top.document.getElementById('iframe_a').src

But the problem is, that I don't know the Iframes ID. My Applica开发者_开发问答tion is running as a Gmail-Gadget and therefore I don't know which ID Google will generate.

So how can I get the URL of my gadget?

Using JQuery will also be fine.


If your script is executed within an iframe, location.href should do it. You might want to access the location object in more detail tho.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜