Reload parent window from child window

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

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

12条回答
  •  再見小時候
    2020-11-28 10:15

    You can use window.opener, window.parent, or window.top to reference the window in question. From there, you just call the reload method (e.g.: window.parent.location.reload()).

    However, as a caveat, you might have problems with window.opener if you need to navigate away from the originally opened page since the reference will be lost.

提交回复
热议问题