Home > Web Front-end > JS Tutorial > body text

How to jump from one page to a new page in js?

藏色散人
Release: 2018-08-15 11:24:56
Original
3258 people have browsed it

This article mainly introduces you to the related issues of how to implement js page jump to a new page. In fact, js jumps are generally used in advertising jumps and link effects. So we need to first understand what the essential concept of js page jump is, that is, the change of browser object window location (url).

Then the following is a summary of several js methods to jump to a specified page.

1. Jump directly in the original form

Copy after login

2.Open a new page in a new window

Copy after login

3. Jump to the specified page

Copy after login

4. Jump to the specified demo.html page

Copy after login

5 .Add judgment jump

Copy after login

6.Button button to jump to the page

Copy after login

The above is a summary of the relevant methods of how to jump the page in js, which has certain Reference value, I hope it will be helpful to friends in need.

Note: The Location object is stored in the Location property of the Window object and represents the Web address of the document currently displayed in that window. Its href attribute stores the completeness of the document URL, and other attributes describe various parts of the URL respectively. These properties are very similar to the URL properties of the Anchor object (or Area object). when a The Location object is converted to a string and the value of the href attribute is returned. This means you can use the expression location instead of location.href.


The above is the detailed content of How to jump from one page to a new page in js?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!