问题
Is it possible to reload the page, where the user came from or, even better, reload the frame the user came from, if it matches an URL?
I have a link. The user clicks it, and it opens in a new window, a new url. A form will run in that new window. What I want, is a function to reload the first window (Where the user came from)
Is that possible?
回答1:
Alright. Here is what you do (just an example, tested, works):
test.html
<frameset cols="50%, 50%">
<frame name="f1" src="frame1.html">
<frame name="f2" src="frame2.html">
</frameset>
frame1.html
<input type="button" name="test" value="Refresh" onclick="parent.f2.location.reload()">
frame2.html
<span>Hello World</span>
variable parent
is the parent of the current frame.
Read this page. its really helpful
Hope that helps
回答2:
I think it is not possible if you open another window It would however be possible if you just use some kind of overlaying frame like jqmodal
the README should give you the necessary instructions: http://dev.iceburg.net/jquery/jqModal/README
回答3:
How about loading the hyperlink url in the same page and redirect the user to the parent page after the form update is done.
来源:https://stackoverflow.com/questions/6981349/refresh-other-frame-from-another-frame-jquery