【问题标题】:How can i open links in an iframe in the main window and not in the iframe?如何在主窗口的 iframe 中而不是在 iframe 中打开链接?
【发布时间】:2013-04-25 23:01:14
【问题描述】:

假设你有一个 iframe:

<iframe style="border-radius:15px;" width="190" height="450" 
     frameborder="0" scrolling="no" marginheight="5"
     marginwidth="10" src="../img/interactive_map/interactive_sverige.htm">
</iframe>

它有它的本地来源,这是一个交互式地图。地图包含链接。目标是在您已经存在的窗口中打开链接,而不是在 iframe 本身(在页面上)。

这可能吗?

/Thnx

【问题讨论】:

标签: jquery html css iframe interactive


【解决方案1】:

将 target="_top" 添加到 interactive_sverige.htm 中的链接不会起到作用吗?

所以在你的 iframe 中:

<a href="foo.html" target="_top">Foo</a>

【讨论】:

    猜你喜欢
    • 2012-01-29
    • 1970-01-01
    • 2018-02-21
    • 2017-07-19
    • 1970-01-01
    • 1970-01-01
    • 2011-06-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多