"; 2. Use the A tag with the syntax "< /a>"; 3. Use "location.href=website"."/> "; 2. Use the A tag with the syntax "< /a>"; 3. Use "location.href=website".">

Home  >  Article  >  Web Front-end  >  How to make page jump (redirect) in html

How to make page jump (redirect) in html

青灯夜游
青灯夜游Original
2021-03-02 16:58:505442browse

Method: 1. Use the meta tag with the syntax "637a1532a47a392b215d896e052e0418"; 2. Use the A tag with the syntax "< ;a href="Website">5db79b134e9f6b82c0b36e0489ee08ed"; 3. Use "location.href=Website".

How to make page jump (redirect) in html

The operating environment of this tutorial: windows7 system, CSS3&&HTML5&&ECMAScript version 5, Dell G3 computer.

Explanation of HTML URL jump

HTML URL jump is to jump from one URL to another URL. For example, you need to enter URL A using In the case of , the website of URL B is opened, then the jump between URL A and URL B is a URL jump. (This method is also commonly used on the 404 page of the website)

meta jump in HTML

In the HTML page, you can use the meta tag to enter the page jump, this The method can control the jump time and freely define the jump URL

html jump code is as follows

 <meta http-equiv="refresh" content="5;url=https://www.php.cn">

Code explanation

Fancy the above code, meta There is a content attribute in the tag, which indicates how many seconds after opening this page the jump will start. There is also a URL attribute, indicating the redirected URL

The A tag in HTML jumps

The A tag in HTML can also be regarded as a page jump kind, just click the mouse to enter the jump

html A tag jump code is as follows

<a href="https://www.php.cn">PHP中文网</a>

[Recommended tutorial: "html video tutorial"]

javascript code jump

You can also use jjs on the web page to achieve page jump or timed jump

The JS jump code is as follows

<script language="javascript" type="text/javascript">   
    // 以下方式直接跳转  
    //PHP中文网
    window.location.href = &#39;https://www.php.cn/&#39;;
    // 五秒以后再跳转
    setTimeout("javascript:location.href=&#39;https://www.php.cn&#39;", 5000);   
</script>

For more programming-related knowledge, please visit: Programming Video! !

The above is the detailed content of How to make page jump (redirect) in html. 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