gpt4 book ai didi

javascript - 如何从 iframe 中获取当前 iframe 位置?

转载 作者:行者123 更新时间:2023-11-29 22:39:47 26 4
gpt4 key购买 nike

我见过这样的解决方案

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

但问题是,我不知道 Iframes ID。我的应用程序作为 Gmail-Gadget 运行,因此我不知道 Google 将生成哪个 ID。

那么如何获取我的小工具的 URL?

使用 JQuery 也可以。

最佳答案

如果您的脚本在 iframe 中执行,location.href 应该执行。您可能想要更详细地访问 location 对象。

关于javascript - 如何从 iframe 中获取当前 iframe 位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3599315/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com