This article is a detailed summary of several ways to refresh the page, including JS and asp.net. Need friends can come to the reference, I hope to help you.
JavaScript refreshes the page in several ways: 1. History.go (0) 2. Location.reload () 3. location=location 4. Location.assign (location) 5. Document.execcommand (' Refresh ') 6. Window.navigate (location) 7. Location.replace (location) 8. Document. url=location.href Automatically refresh the page: 1. Page Auto Refresh: Add the following code to <head> area <meta http-equiv= " Refresh "content=" > 20 means to refresh the page every 20 seconds. 2. Page Auto Jump: Add the following code to <head> area <meta http-equiv= "Refresh" content= 20;url=http:// jay-xu33.cnblogs.com/"> 20 fingers 20 seconds to jump to http://jay-xu33.cnblogs.com/page 3. Page automatically refresh JS version < Script language= "JavaScript" > function Myrefresh () { &NBSP ; window.location.reload (); } settimeout (' Myrefresh () ', 1000); Specify 1 seconds to refresh once </script> ASP. NET how to output refresh the parent window script statement 1. This.response.write ("<script>opener.location.reload ();</script>"); 2. This.response.write ("<script>opener.window.location.href = opener.window.location.href;</script>"); 3. Response.Write ("<script language=javascript>opener.window.navigate (" You want to refresh the page. asp ');</script> "); JS Refresh Framework Script statement //How to refresh the page containing the framework with <script language=javascript> Parent.location.reload (); </script> //child Windows Refresh parent window <script language= javascript> self.opener.location.reload (); </script> (or <a href= " Javascript:opener.location.reload () "> Refresh </a> " //How to refresh the page of another frame with < Script language=javascript> parent. Another FrameID.location.reload (); </script> If you want to close the window or refresh when you want to open windows, call the following statement in <body>. <body onload= "opener.location.reload ()" > Refresh when opening windows <body onunload= "Opener.location.reload ()" > Close window Refresh <script language= "JavaScript" > Window.opener.document.location.reload () </script>