Overview
I believe a lot of web developers know, in the development of the Web program, the page between the jump, there are many kinds of, but effective jump is less, the following is my usual development process used in some JavaScript jump way, take out and share with you.
The first type: direct jump plus parameter
<script language= "javascript" type= "Text/javascript" >
</script>
Direct Jump without parameters:
<script>window.location.href= ' http://www.baidu.com ';</script>
Second: Return to the previous preview screen
<script language= "JavaScript" >
Alert ("return");
Window.history.back (-1);
</script>
Tag nesting:
<a href= "Javascript:history.go ( -1)" > Back to Previous </a>
<a href= "<%=request.servervariables (" Http_referer ")%>" > Back to Previous </a>
The third type: Specifies that the jump page is not valid for the frame ...
<script language= "JavaScript" >
Window.navigate ("top.jsp");
</script>
The fourth type: Specifies that the jump page is not valid for the frame ...
<script language= "JavaScript" >
self.location= ' top.htm ';
</script>
The fifth type: Specify that the jump page is valid for the frame ...
<script language= "JavaScript" >
Alert ("Illegal access! ");
top.location= ' xx.aspx ';
</script>
The Sixth Type: Button button to add event jump
<input name= "Pclog" type= "button" value= "GO" onclick= "location.href= ' Login.aspx '" >
The seventh type: opens in a new window:
Application Examples:
<script language= "JavaScript" >
</body>
Several ways that JavaScript implements page jumps