【发布时间】:2013-08-25 23:27:13
【问题描述】:
我正在尝试在不修改链接代码的情况下检索 iframe 内的任何点击 URL。我的目标是让用户在 iframe 正文之外单击 iframe 的 URL。我已经尝试了以下方法:
document.write(location.href);
document.write(window.location.href);
document.write(window.location);
document.write(document.URL);
document.write(document.location);
【问题讨论】:
-
你写这个的地方,它应该在你的 iframe 来源的页面正文中
-
我不能修改进入iframe的内容,还有可能吗?
标签: javascript html url iframe