Home > Web Front-end > JS Tutorial > Summary of several ways to refresh the parent window in JS

Summary of several ways to refresh the parent window in JS

高洛峰
Release: 2016-12-07 13:36:03
Original
1734 people have browsed it

Embedded iframe and frame collection window in the floating layer, multiple methods to refresh the parent page

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

Pop up the sub-page

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

Sub window refreshes the parent window

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

New to open () method to open the window

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

Refresh the window opened with winodw.showModelDialog() method

Java code

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


Related labels:
js
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template