从 iframe 内重新加载父窗口 [英] reload parent window from within an iframe

查看:22
本文介绍了从 iframe 内重新加载父窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 iframe 中有我的登录页面,并希望从 iframe 中使用 ajax 和 jquery 重新加载父窗口而不刷新,但我收到这样的错误

I have my login page in an iframe and wished to reload the parent window using ajax and jquery from within iframe without refreshing but i'm getting errors like this


(this[0].ownerDocument || this[0]).createDocumentFragment is not a function

请帮忙!

推荐答案

我可以通过使用 javascript 重新加载页面来实现这一点

I could achieve this by reloading the page using javascript

parent.location.reload();

然后我触发了一个触发器来打开目标 iframe

then i fired a trigger to open the target iframe

$("#log-inout").trigger("click");

我需要这样的系统来应对特殊情况.这可能会帮助处于类似情况的其他人.

I needed such system for a peculiar condition. This might help others in similar conditions.

这篇关于从 iframe 内重新加载父窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆