【问题标题】:iframe loads outside parent windowiframe 在父窗口外加载
【发布时间】:2014-08-27 04:50:36
【问题描述】:

我正在 iframe 窗口中从另一个站点加载内容,但是当我选择任何链接时,它会在窗口中打开父站点。我需要在同一个 iframe 中打开所有内容吗?如何解决?

代码:

<div class="calculator" style="display: block;width: 900px; height: 440px; overflow: hidden; ">
<iframe src="http://www.avtosojuz.ua/technical_service/" align="middle" width="962" height="100%" scrolling="no" frameborder="0" style="margin-top: -440px;
"></iframe>
</div>

【问题讨论】:

  • 等等...您是说如果您单击 iframe 中的链接,它会将该链接加载到包含 DOM 中 iframe 的父窗口中? Because I can't replicate that

标签: javascript php html css iframe


【解决方案1】:

之前有人问过这个问题:How to open a iframe link within the same iframe?。引用外部网站时似乎无法控制这一点。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-03-20
    • 1970-01-01
    • 2013-05-03
    • 2015-04-10
    • 1970-01-01
    • 1970-01-01
    • 2017-08-17
    相关资源
    最近更新 更多