Meta tag page jumps and js code jumps in html, and delayed jump records

Meta tag page jump

 

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

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

<meta http-equiv="refresh" content="0;url=https://cn.bing.com">
<!-- 0则是直接跳转,可以设置为5秒后跳转到指定URL ,如果不加url属性则表示5秒后刷新本页-->  

js code jump

<script language="javascript" type="text/javascript">   
    // 以下方式直接跳转  
    window.location.href = 'https://cn.bing.com';
    // 五秒以后再跳转
    setTimeout("javascript:location.href='https://cn.bing.com'", 5000);   
</script>

Guess you like

Origin blog.csdn.net/q906270629/article/details/129019384