Reload parent window from child window

前端 未结 12 1347
-上瘾入骨i
-上瘾入骨i 2020-11-28 09:35

How can I reload my child window\'s parent using jQuery?

相关标签:
12条回答
  • 2020-11-28 10:15
      top.frames.location.reload(false);
    
    0 讨论(0)
  • 2020-11-28 10:15

    Prevents previous data from been resubmitted. Tested in Firefox and Safari.

    top.frames.location.href = top.frames.location.href;
    
    0 讨论(0)
  • No jQuery is necessary in this situation.

    window.opener.location.reload(false);
    

    https://developer.mozilla.org/en-US/docs/Web/API/Window

    0 讨论(0)
  • 2020-11-28 10:19

    This working for me:

      window.opener.location.reload()
      window.close();
    

    In this case Current tab will close and parent tab will refresh.

    0 讨论(0)
  • 2020-11-28 10:22

    this will work

    window.location.assign(window.location.href);
    
    0 讨论(0)
  • 2020-11-28 10:28

    This will work for refresh parent window from child window

    window.opener.location.reload(true);
    

    for some version of IE this will not work so you can set some delay

    window.setTimeout(window.opener.location.reload(true), 3000);
    
    0 讨论(0)
提交回复
热议问题