<p></p>
<p>Today I have summarized several methods of page jump, which are implemented using meta tags, using javascript, and using php. Let’s share them one by one below. </p>
<p><strong>1. Meta tag implementation </strong></p>
<p>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</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
1
</td>
<td class="code">
<code class="html plain"><</code><code class="html keyword">meta</code> <code class="html color1">http-equiv</code><code class="html plain">=</code><code class="html string">"refresh"</code> <code class="html color1">content</code><code class="html plain">=</code><code class="html string">"0.1; url=http://beyondweb.cn/"</code><code class="html plain">></code>
</td>
</tr>
</tbody>
</table>
<p><strong>2. Javascript implementation</strong></p>
<p>Method 1: </p>
<p>This method is more commonly used</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
1
</td>
<td class="code">
<code class="js plain">window.location.href = </code><code class="js string">"http://beyondweb.cn/"</code><code class="js plain">;</code>
</td>
</tr>
</tbody>
</table>
<p>Method 2: </p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
1
</td>
<td class="code">
<code class="js plain">self.location = </code><code class="js string">"http://beyondweb.cn/"</code><code class="js plain">;</code>
</td>
</tr>
</tbody>
</table>
<p>Method 3: </p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
1
</td>
<td class="code">
<code class="js plain">top.location = </code><code class="js string">"http://beyondweb.cn/"</code><code class="js plain">;</code>
</td>
</tr>
</tbody>
</table>
<p>Method 4: </p>
<p>Only valid for IE series browsers, not very practical</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
1
</td>
<td class="code">
<code class="js plain">window.navigate(</code><code class="js string">"http://beyondweb.cn/"</code><code class="js plain">);</code>
</td>
</tr>
</tbody>
</table>
<p><strong>3. PHP implementation</strong></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
1
2
3
</td>
<td class="code">
<code class="css plain"><?php</code>
<code class="css spaces"> </code><code class="css plain">header(</code><code class="css string">"Location: http://beyondweb.cn/"</code><code class="css plain">);</code>
<code class="css plain">?></code>
</td>
</tr>
</tbody>
</table>
<p>Ok, the above are the several page jump methods summarized today. </p>
<p align="left"></p>
<div style="display:none;">
<span id="url" itemprop="url">http://www.bkjia.com/PHPjc/745579.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http: //www.bkjia.com/PHPjc/745579.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">Today we summarized several methods of page jump, which are implemented using meta tags, using javascript, and using php Implementation, let’s share them one by one. 1. To implement meta tags, just...</span>
</div>
<div class="art_confoot"></div>
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