The HTM code is as follows
The code is as follows |
Copy Code |
"<body> <a href=htm onclick= "window.open (' htm ')" >new</a> </body>
|
The HTM code is as follows
The code is as follows |
Copy Code |
"<body> <a href=# onclick= "opener.location.href= ' http://www.111cn.net '; Window.close ()" >nbn</a> </body>
|
The following summary of several JS Refresh parent window
To refresh the parent page IFrame with an IFRAME and popup page
The code is as follows |
Copy Code |
JS Code <script language=javascript> Parent.location.reload (); </script> JS Code <script language=javascript> Parent.location.reload (); </script> <script language=javascript> Parent.location.reload (); </script> |
Popup child page
The code is as follows |
Copy Code |
JS Code <script language=javascript> Window.opener.location.reload (); </script> JS Code <script language=javascript> Window.opener.location.reload (); </script> <script language=javascript> Window.opener.location.reload (); </script> |
child window refreshes parent window
The code is as follows |
Copy Code |
JS Code <script language=javascript> Self.opener.location.reload (); </script> JS Code <script language=javascript> Self.opener.location.reload (); </script>
<script language=javascript> Self.opener.location.reload (); </script> |
Refreshing a window opened with the open () method
The code is as follows |
Copy Code |
JS Code <script language=javascript> Window.opener.location.href=window.opener.location.href; </script> JS Code <script language=javascript> Window.opener.location.href=window.opener.location.href; </script> <script language=javascript> Window.opener.location.href=window.opener.location.href; </script> |
Refreshing a window opened with the Winodw.showmodeldialog () method
The code is as follows |
Copy Code |
Java code <script language= "JavaScript" > Window.parent.dialogArguments.document.execCommand (' Refresh '); </script> |
To capture this value, the parent window adds the return value to the open () event described in story one
code is as follows |
copy code |
<script language=" JavaScript " function open () { var str=window.showmodaldialog ("Page C"); if (str!=null) { Picobj.innerhtml+=str; } } </script> |