Summary of the various ways javascript refreshes the parent page

  • 2020-03-30 03:52:29
  • OfStack

Refresh the parent iframe with the iframe, pop-up child page


<script language=JavaScript> 
parent.location.reload(); 
</script>

Pop-up subpage


<script language=JavaScript> 
window.opener.location.reload(); 
</script>

The child window refreshes the parent window


<script language=JavaScript> 
self.opener.location.reload(); 
</script>

Refreshes the window that opens with the open() method


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

Refreshes the window that opens with the winodw.showmodeldialog () method


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

Related articles: