【问题标题】:Parent iframe URL父 iframe 网址
【发布时间】:2011-12-28 01:14:16
【问题描述】:

我正在使用 100% 屏幕大小的 iframe,它重定向到另一个域。 基本上你有一个全屏尺寸的 iframe,在其中你可以看到另一个你正在操作的域。

URL 始终从初始域读取,例如:www.iframedomain.com 在 iframe 中看到和使用的域是 www.childdomain.com

在上述情况下,有没有办法使用 www.childdomain.com 中的代码更改 www.iframedomain.com 上的 URL?

谢谢

【问题讨论】:

  • 糟糕的想法,你想达到什么目的?

标签: php jquery iframe


【解决方案1】:

你可以在 JavaScript 中做到这一点

Iframe payone redirect parent

PHP "header (location)" inside IFRAME, to load in _top location?

你不能在 PHP 中做到这一点。

可能的想法是只有客户端知道子页面在哪个 iframe 中,因此脚本必须在客户端完成。虽然 PHP 知道引用者,但它无法将浏览器行为控制到您想要的程度?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-09-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-11
    相关资源
    最近更新 更多