html网页自动跳转代码是什么?
1. html 中使用 meta 中跳转,通过 meta 可以设置跳转时间和页面
<head> <!--只是刷新不跳转到其他页面 --> <meta http-equiv="refresh" content="5"> <!--定时转到其他页面 --> <meta http-equiv="refresh" content="5;url=index.html"> </head>
2. 通过 javascript 中实现跳转
// 直接跳转 window.location.href='index.html'; // 定时跳转 setTimeout("javascript:location.href='index.html'", 5000);
以上就是 html 网页自动跳转代码是什么的详细内容,更多请关注码云笔记其它相关文章!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
码云笔记 » html网页自动跳转代码是什么?
码云笔记 » html网页自动跳转代码是什么?