window.location.href = "URL you want to jump"; js page Jump
location.reload (); page reload, refresh
A: JS reload the page to refresh local, Back
<a href="javascript:history.go(-1)"> Back </a>
<a href="javascript:location.reload()"> reload the page to refresh the local </a>
<A href = "javascript: history.go (-1 ); location.reload ()"> Back to refresh, refresh local </a>
How to return to the previous two and refresh the JS code should be written.
history.go(-2);
location.reload();
Two: js method
<a href="#" onclick="self.location=document.referrer;">返回</a>
asp and refreshed automatically return method:
response.Write("<script language=javascript>self.location=document.referrer;</script>")
Generally used to return to the previous page after submitting action and a page refresh!
1. Javascript Back history.go (-1), two pages Returns: history.go (-2);
. 2. history.back ()
3. window.history.forward () returns the next
4 . window.history.go (return to the first few pages, you can also use the URL visited)
Example:
<a href="javascript:history.go(-1);">向上一页</a>
response.Write("<script language=javascript>")
response.Write("if(!confirm('完成任务?')){history.back();}")
response.Write("</script>")
response.Write("<script language=javascript>history.go(-1);</script>")
<a href="javascript:history.go(-1);">向上一页</a>
Page Jump: onclick = "window.location.href = 'list.aspx'"
PS Tips (JS reference JS):
<script type=text/javascript>
<!--if (typeof SWFObject == "undefined") {
document.write('<script type="text/javascript" src="/scripts/swfobject-1.5.js"></script>');
}//-->
</script>
Javascript refresh the page 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
A method of automatically refreshes:
1. page automatically refreshes: The following code to <head> region
<meta http-equiv = "refresh " content = "20">
wherein 20 refers to the page refresh every 20 seconds.
2. Page automatically jump: the following code to <head> region
<meta http-equiv = "refresh " content = "20; url = http: //www.javaeye.com">
wherein the spacer 20 refers to the 20-sec skip http://www.javaeye.com page
3. The page automatically refreshes js version
<script language="JavaScript">
function myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',1000); //指定1秒刷新一次
</script>
How ASP.NET output refresh parent window script statements
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(''你要刷新的页.asp'');</script>")
JS script statements to refresh the frame of
the page that contains the frame // how to refresh with
<script language=JavaScript>
parent.location.reload();
</script>
// child window parent window refresh
<script language=JavaScript>
self.opener.location.reload();</script>( 或 <a href="javascript:opener.location.reload()">刷新</a> )
// how to refresh the page using another framework
<script language=JavaScript>
parent.另一FrameID.location.reload();
</script>
If you want to refresh or want to refresh the window when the window is closed, then you can call the following statements in the <body>.
<body onload = "opener.location.reload () "> refresh window
<body onUnload = "opener.location.reload () "> Refresh closed
<Script Language = "JavaScript">
window.opener.document.location .reload ()
</ Script>
Three: use in ASP JS Back and Refresh achieve
using the Back and Refresh JS achieve I think is the use of ASP development site, it often used in ASP. But there are several wording, but the purpose is the same.
<% response.write("<font color=""red"" font-size=""12px"">已经删除成功!font>") %><div align = "center"> [<a href="/"onClick="javascript :window.history.go(-1);return false;" class="fontsize14"> <span style = "color: # CC0033 "> return </ span> </a>] </ div>
this code is the function of informing the user if the functions implemented has been achieved, but at the time of return is best to refresh the original page for new information is displayed delete or make something that is not displayed. But this code can not refresh the original page when returned.
So we need to add this piece of code in the original page:
<Script>
IF (! = the window.name "Bencalie") {
// If the name attribute specifies the name of the page is not refreshed it
location.reload ();
the window.name = "Bencalie";
}
the else {
// If the page the name attribute is the name specified do nothing to avoid constantly refresh
the window.name = "";
}
</ Script>
In this way we can achieve our objective - the return to the previous page and refresh.
Article from: https://www.cnblogs.com/amingxiansen/p/9074596.html
A: JS reload the page to refresh local, Back
<a href="javascript:history.go(-1)"> Back </a>
<a href="javascript:location.reload()"> reload the page to refresh the local </a>
<A href = "javascript: history.go (-1 ); location.reload ()"> Back to refresh, refresh local </a>
How to return to the previous two and refresh the JS code should be written.
history.go(-2);
location.reload();
Two: js method
<a href="#" onclick="self.location=document.referrer;">返回</a>
asp and refreshed automatically return method:
response.Write("<script language=javascript>self.location=document.referrer;</script>")
Generally used to return to the previous page after submitting action and a page refresh!
1. Javascript Back history.go (-1), two pages Returns: history.go (-2);
. 2. history.back ()
3. window.history.forward () returns the next
4 . window.history.go (return to the first few pages, you can also use the URL visited)
Example:
<a href="javascript:history.go(-1);">向上一页</a>
response.Write("<script language=javascript>")
response.Write("if(!confirm('完成任务?')){history.back();}")
response.Write("</script>")
response.Write("<script language=javascript>history.go(-1);</script>")
<a href="javascript:history.go(-1);">向上一页</a>
Page Jump: onclick = "window.location.href = 'list.aspx'"
PS Tips (JS reference JS):
<script type=text/javascript>
<!--if (typeof SWFObject == "undefined") {
document.write('<script type="text/javascript" src="/scripts/swfobject-1.5.js"></script>');
}//-->
</script>
Javascript refresh the page 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
A method of automatically refreshes:
1. page automatically refreshes: The following code to <head> region
<meta http-equiv = "refresh " content = "20">
wherein 20 refers to the page refresh every 20 seconds.
2. Page automatically jump: the following code to <head> region
<meta http-equiv = "refresh " content = "20; url = http: //www.javaeye.com">
wherein the spacer 20 refers to the 20-sec skip http://www.javaeye.com page
3. The page automatically refreshes js version
<script language="JavaScript">
function myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',1000); //指定1秒刷新一次
</script>
How ASP.NET output refresh parent window script statements
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(''你要刷新的页.asp'');</script>")
JS script statements to refresh the frame of
the page that contains the frame // how to refresh with
<script language=JavaScript>
parent.location.reload();
</script>
// child window parent window refresh
<script language=JavaScript>
self.opener.location.reload();</script>( 或 <a href="javascript:opener.location.reload()">刷新</a> )
// how to refresh the page using another framework
<script language=JavaScript>
parent.另一FrameID.location.reload();
</script>
If you want to refresh or want to refresh the window when the window is closed, then you can call the following statements in the <body>.
<body onload = "opener.location.reload () "> refresh window
<body onUnload = "opener.location.reload () "> Refresh closed
<Script Language = "JavaScript">
window.opener.document.location .reload ()
</ Script>
Three: use in ASP JS Back and Refresh achieve
using the Back and Refresh JS achieve I think is the use of ASP development site, it often used in ASP. But there are several wording, but the purpose is the same.
<% response.write("<font color=""red"" font-size=""12px"">已经删除成功!font>") %><div align = "center"> [<a href="/"onClick="javascript :window.history.go(-1);return false;" class="fontsize14"> <span style = "color: # CC0033 "> return </ span> </a>] </ div>
this code is the function of informing the user if the functions implemented has been achieved, but at the time of return is best to refresh the original page for new information is displayed delete or make something that is not displayed. But this code can not refresh the original page when returned.
So we need to add this piece of code in the original page:
<Script>
IF (! = the window.name "Bencalie") {
// If the name attribute specifies the name of the page is not refreshed it
location.reload ();
the window.name = "Bencalie";
}
the else {
// If the page the name attribute is the name specified do nothing to avoid constantly refresh
the window.name = "";
}
</ Script>
In this way we can achieve our objective - the return to the previous page and refresh.
Article from: https://www.cnblogs.com/amingxiansen/p/9074596.html