Home >Web Front-end >JS Tutorial >How to refresh the parent window in javascript

How to refresh the parent window in javascript

一个新手
一个新手Original
2017-09-13 10:07:241616browse

Use iframe and 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 the open() method Window

<script language=JavaScript>
window.opener.location.href=window.opener.location.href; 
</script>


Refresh the window opened with winodw.showModelDialog() method

<script language="javascript">
window.parent.dialogArguments.document.execCommand(&#39;Refresh&#39;); 
</script>

The above is the detailed content of How to refresh the parent window in javascript. 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