【问题标题】:Cause outer iframe to navigate from deeply nested child iframe导致外部 iframe 从深度嵌套的子 iframe 导航
【发布时间】:2017-07-01 12:49:05
【问题描述】:

我需要帮助来重新加载嵌套在另外两个 iframe 中的 iframe,已经尝试过 parent.documentResponse.Redirect,但没有按我的要求做。

如果我使用Response.Redirect (URL)iframe 1 会在iframe 3 中重新加载。

如果我尝试使用:

parent.document.getelementbyid ('iframe1')

parent.document.getelementbyid ('iframe3')

parent.document.getelementbyid ('<%=iframe1.ClientID.ClientID %>')

parent.document.getelementbyid ('<%=iframe3.ClientID.ClientID %>')

null 被返回。

我附上了一张图片,看看我想做什么:

我希望通过单击 iframe 3 内的按钮,重新加载 iframe 1

【问题讨论】:

  • 本质上是一个好问题,但与 jquery 无关。您知道在内部 iframe 上导致服务器端 Redirect 不可能影响外部 iframe,因为在服务器上它们彼此没有关系,对吧?
  • 是的,但是如果我在内部框架中进行重定向,那么第一帧将在内部框架中重新加载,然后我将有更多的 3 帧。

标签: javascript html asp.net iframe


【解决方案1】:

我做到了,只是通过 parent.location='url'。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-10-18
    • 2013-09-03
    • 1970-01-01
    • 1970-01-01
    • 2013-06-10
    • 1970-01-01
    • 2013-02-21
    相关资源
    最近更新 更多