1 <span onclick="javascript:window.open (' http://eccu.fr/guanli/login.aspx ')"
style="color: #f00; Text-decoration:underline; Cursor:pointer; ">
Website backstage
</span>
Note: Window.location.href=url;
JS Way of page Jump1. Window.location.href Mode<script language="JavaScript"Type="Text/javascript">window.location.href="target.aspx"; </script>2. Window.navigate Way to jump<script language="JavaScript">Window.navigate ("target.aspx");</script>3. Window.loction.replace way to achieve page jump, note the difference from the first way<script language="JavaScript">Window.location.replace ("target.aspx");</script>there are 3 JSP pages (1. aspx,2. aspx,3. aspx), into the system default is 1.aspx, when I enter 2.aspx,2. aspx inside with Window.location.replace ("3.aspx"); With the use of Window.location.href ("3.aspx"), there is no difference from the user interface, but when the 3.aspx page has a"return"button, call Window.history.go (-1); Wondow.history.back () method, a little bit of this return button will return to the 2.aspx page, the difference is out, when using Window.location.replace ("3.aspx"), to the 3.aspx page,3The. aspx page calls Window.history.go (-1); Wondow.history.back (); The method is not good and will return to 1.aspx. 4Self.location Way to implement the page jump, and the following top.location have a small difference<script language="JavaScript">self.location='target.aspx'; </script>5. Top.location<script language="JavaScript">top.location='target.aspx'; </script>6. This method is not recommended to jump<script language="JavaScript">Alert ("return"); Window.history.back (-1); </script>meta-mode implementation jumps (content=3Unit is seconds)<meta Http-equiv=refresh content=3; Url="http://www.dayanmei.com">Summary two:1. Javascript returns to the previous page History.go (-1), return two pages: History.go (-2);2. History.back ().3. Window.history.forward () Return to next page4. Window.history.go (Return to page, you can also use the visited URL) example:<a href="Javascript:history.go ( -1);"> Up one page </a>Response. Write ("<script language=javascript>") Response. Write ("if (!confirm (' Complete task? ')) {History.back ();}") Response. Write ("</script>") Response. Write ("<script language=javascript>history.go ( -1);</script>")<a href="Javascript:history.go ( -1);"> Up one page </a>page Jump: OnClick="window.location.href= ' list.aspx '"p.s. Tips (js reference js): [JavaScript] View plaincopy<mce:script type=text/javascript><!--if(typeofSWFObject = ="undefined") {document.write ('<SCR'+'IPT type= "Text/javascript" src= "/scripts/swfobject-1.5.js" ></scr'+'ipt>');} //--></mce:script>JavaScript refreshes the page in several ways:1History.go (0)2location.reload ()3location= Location4location.assign (location)5Document.execcommand ('Refresh')6window.navigate (location)7location.replace (location)8Document. Url=location.href How to automatically refresh pages:1. Automatic page Refresh: Add the following code area in<meta http-equiv="Refresh"Content=" -">20 refers to a refresh of the page every 20 seconds.2. Page Auto Jump: Add the following code area in<meta http-equiv="Refresh"Content="20;url=http://www.wyxg.com">where 20 refers to 20 seconds after the jump to http://www.wyxg.com Page3page Auto-refresh JS version [C-Sharp ] View plaincopy<mce:script language="JavaScript"><!--function Myrefresh () {window.location.reload (); } setTimeout ('Myrefresh ()', +);//Specify 1 seconds to refresh one time//--></mce:script>ASP. NET how to Output Flush parent window script Statements1. 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 that contains the frame<script language=javascript>parent.location.reload ();</script>//child window refreshes parent window<script language=javascript>self.opener.location.reload ();</script>(or<a href="javascript:opener.location.reload ()"> Refresh </a> )//How to refresh another frame's page with<script language=javascript>parent. Another FrameID.location.reload ();</script>If you want to refresh when you close the window or if you want to open the windows,<body>you can call the following statement in the [JavaScript] View plaincopy<body onload="opener.location.reload ()">Refresh when opening windows<body onunload="opener.location.reload ()">Refresh when off<mce:script language="JavaScript"><!--window.opener.document.location.reload ()//--></mce:script> View Code
Span tag to jump to new page