1. Javascript returns to the previous page history.go(-1), returns two pages: history.go(-2); 2. history.back(). 3. window.history.forward() returns to the next page 4. window.history.go (return to the page number, you can also use the visited URL) example: <a href="javascript:history.go(-1);">Up page</a> response.Write("<script language=javascript>") response.Write("if(!confirm('Complete the task?')){history.back();}") response.Write("</script>") response.Write("<script language=javascript>history.go(-1);</script>") <a href="javascript:history.go(-1);">Up page</a> Page jump: onclick="window.location.href='list.aspx'" PS Tips (JS references JS): <script type=text/javascript> <!-- if (typeof SWFObject == "undefined") { document.write('<scr' + 'ipt type="text/javascript" src="/scripts/swfobject-1.5.js"></scr' + 'ipt>');} //--> </script> Several ways to refresh the page with Javascript: 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 How to automatically refresh the page: 1. Automatic page refresh: Add the following code to the <head> area <meta http-equiv="refresh" content="20"> 20 means refreshing the page every 20 seconds. 2. Automatic page jump: Add the following code to the <head> area <meta http-equiv="refresh" content="20;url=http://www.javaeye.com"> 20 means jumping to http://www.javaeye.com after 20 seconds. 3. Page automatic refresh js version <script language="JavaScript"> function myrefresh() { window.location.reload(); } setTimeout('myrefresh()',1000); //Specify refresh once every 1 second </script> How to output script statements to refresh the parent window in ASP.NET 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(''The page you want to refresh.asp'');</script>") JS refresh frame script statement //How to refresh the page containing the frame <script language=JavaScript> parent.location.reload(); </script> //The child window refreshes the 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 <script language=JavaScript> parent.anotherFrameID.location.reload(); </script> If you want to refresh when closing the window or when opening the window, just call the following statement in <body>. <body onload="opener.location.reload()"> Refresh when opening the window <body onUnload="opener.location.reload()"> Refresh on close <script language="javascript"> window.opener.document.location.reload() </script> |
<<: Navigation Design and Information Architecture
>>: MySQL query optimization using custom variables
Recently, when I was writing a WeChat applet, the...
Data URI Data URI is a scheme defined by RFC 2397...
Table of contents introduction Install Homebrew I...
Table of contents Preface Optional Chaining Nulli...
When position is absolute, the percentage of its ...
1. Environmental Preparation 1.MySQL installation...
Table of contents 1. MySQL replication related co...
1. What is mycat A completely open source large d...
describe When calling this interface, you need to...
This article shares the specific code for WeChat ...
According to the coefficient of pi and the radius...
This article example shares the specific code of ...
I was recently working on a project at the compan...
It is very important to monitor the operating sta...
Table of contents 1. Boolean 2. Expression 3. Mul...