使用javascript从子窗口刷新父窗口 [英] Refresh parent window from child window using javascript
本文介绍了使用javascript从子窗口刷新父窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在新窗口中打开新的弹出页面。现在当我从子窗口按下html输入按钮时,我想关闭这个子窗口,然后我想刷新父窗口。
如何使用javascript进行操作?
你能告诉我解决方案吗?
尝试这样的事情:
function closeAndRefresh(){
opener.location .reload(); //或opener.location.href = opener.location.href;
window.close(); //或self.close();
}
I am opening new pop-up page in new window. Now When I am pressing a html input button from child window, I want to close this child window then I want to refresh the parent window. How I can do using javascript?
Can you anyone suggest me the solution?
解决方案
try something like this:
function closeAndRefresh(){
opener.location.reload(); // or opener.location.href = opener.location.href;
window.close(); // or self.close();
}
这篇关于使用javascript从子窗口刷新父窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文