Home  >  Article  >  Web Front-end  >  Several methods to realize web page jump (meta tag, js implementation, php implementation)_Basic knowledge

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

WBOY
WBOYOriginal
2016-05-16 16:47:331309browse

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.

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