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

Several methods to realize web page jump (meta tag, js implementation, php implementation)_Basic knowledge

WBOY
Release: 2016-05-16 16:47:33
Original
1320 people have browsed it

1. Meta tag implementation

Just add the following sentence to the head, and it will jump to the target page after staying on the current page for 0.1 seconds

Copy code The code is as follows:


2. Javascript implementation

Method 1:

This method is more commonly used

Copy code The code is as follows:

window.location.href = "http://jb51 .net/";

Method 2:

Copy code The code is as follows:

self.location = "http://jb51.net /";

Method three:

Copy code The code is as follows:

top.location = "http://jb51.net /";

Method 4:

Only valid for IE series browsers, not very practical

Copy code The code is as follows:

window.navigate("http://jb51.net /");

3. PHP implementation

Copy code The code is as follows:

header("Location: http://jb51.net/");
?>

Ok, the above are the several page jump methods summarized today.

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