Home > Article > Web Front-end > How to implement page jump in javascript
Javascript method to implement page jump: 1. Open a new page on the current page by modifying the address link attribute [location.href] of the form object window; 2. You can call the [location.href] of the form object window open()] method implementation.
The operating environment of this tutorial: Windows 7 system, JavaScript version 1.8.5, DELL G3 computer.
How to implement page jump using javascript:
1. Open a new page on the current page
By modifying the address link attribute of the form object window location.href implements opening a new page in the current page, that is,
< language="java" type="text/java"> window.location.href="http://110.html"; </>
2. To implement opening a new page in a new window
can be achieved by calling the open() method of the form object window.
That is: window.open('http://hx110.com');
3. Jump back to the previous page
< language="java"> alert("返回"); window.history.back(-1); </>
4. self: current Window object (if it is in an iframe, it is the window object of the frame)
< language="Java"> self.location='top.html'; </>
5. Pop-up prompt box jumps to other pages
< language="java"> <!-- function logout()...{ alert("你确定要注销身份吗?"); window.location.href="http://110.html" }
Related free learning Recommended: javascript video tutorial
The above is the detailed content of How to implement page jump in javascript. For more information, please follow other related articles on the PHP Chinese website!