Home  >  Article  >  Web Front-end  >  How does Javascript make web pages jump?

How does Javascript make web pages jump?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-07-20 14:39:479338browse

Methods: 1. Use window.location.href method; 2. Use window.history.back method; 3. Use window.navigate method; 4. Use self.location method; 5. Use top.location Way.

How does Javascript make web pages jump?

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

Method 1 for writing web page jumps in JavaScript: Use the window.location.href method to jump. You can jump directly to the specified page.

How does Javascript make web pages jump?

# Method 2 for JavaScript to write web page jumps: Use the window.history.back method to jump. It is used for web page return. Click to return to the last interface visited.

How does Javascript make web pages jump?

#JavaScript writing web page jump method three: use window.navigate method to jump. Similar to the first method. But some browsers no longer support it.

How does Javascript make web pages jump?

#JavaScript writing web page jump method four: use self.location method to jump. Only users can jump to this web page.

How does Javascript make web pages jump?

#JavaScript writing web page jump method five: use top.location method to jump. Open the web page in the top-level page.

How does Javascript make web pages jump?

[Recommended learning: javascript advanced tutorial]

The above is the detailed content of How does Javascript make web pages jump?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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