Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
600 views
in Technique[技术] by (71.8m points)

jquery - Refresh parent window from child window using javascript

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

try something like this:

function closeAndRefresh(){
  opener.location.reload(); // or opener.location.href = opener.location.href;
  window.close(); // or self.close();
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...