Home  >  Article  >  Web Front-end  >  How to refresh the parent page in JS

How to refresh the parent page in JS

php中世界最好的语言
php中世界最好的语言Original
2018-03-16 10:14:053369browse

This time I will show you how to refresh the parent page with JS, and what are the precautions for refreshing the parent page with JS. The following is a practical case, let's take a look.

Use iframe, pop up sub-page to refresh the parent page iframe

<script language=JavaScript> 
parent.location.reload(); 
</script>
Pop up the sub-page

<script language=JavaScript> 
window.opener.location.reload(); 
</script>
The child window refreshes the parent window

<script language=JavaScript> 
self.opener.location.reload(); 
</script>
Refresh with open() The window opened by the method

<script language=JavaScript> 
window.opener.location.href=window.opener.location.href; 
</script>
Refresh the window opened by the winodw.show

ModelDialog() method

<script language="javascript"> 
window.parent.dialogArguments.document.execCommand('Refresh'); 
</script>
I believe you have mastered the method after reading the case in this article, more Please pay attention to php Chinese website

Other related articles for exciting content!

Recommended reading:

The API that jQuery must master

aja’s asynchronous upload plug-in

The above is the detailed content of How to refresh the parent page in JS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn