几秒钟后页面自动跳转到指定页
2016-06-19 18:24
288 查看
当页面出现错误时,有必要跳转到指定页面。对于seo优化和用户体验是不可缺少的。下面我指出两种跳转到指定页面的方法:
1.在head头部里写meta标签
<head>
<meta http-equiv="refresh" content="0;URL=http://xxx.xxx.xxx/">
</head>
content=0 ; <!--设置本页面停留时间,单位为秒-->
url=http://www.baidu.com/ <!--将要跳转的页面路径-->
2.用javascript实现
<html>
<script language=javascript>
setTimeout('window.location="http://panliu888.myetang.com"',5000)
</script>
</html>
location为指定跳转页面的路径,5000为时间,单位毫秒!
1.在head头部里写meta标签
<head>
<meta http-equiv="refresh" content="0;URL=http://xxx.xxx.xxx/">
</head>
content=0 ; <!--设置本页面停留时间,单位为秒-->
url=http://www.baidu.com/ <!--将要跳转的页面路径-->
2.用javascript实现
<html>
<script language=javascript>
setTimeout('window.location="http://panliu888.myetang.com"',5000)
</script>
</html>
location为指定跳转页面的路径,5000为时间,单位毫秒!
相关文章推荐
- Memcached原理
- “进度条”博客——第十六周
- HDU 2576 Another Sum Problem
- 3DES和AES加密实现(一)
- 干支纪年、干支纪月、干支纪日、干支纪时
- Linux 字符设备驱动结构(一)—— cdev 结构体、设备号相关知识解析
- Redis3.2的安装配置与JReid测试
- 浅谈Python的异常处理
- 指针学习路线
- Linux 字符设备驱动结构(二)—— 自动创建设备节点
- openwrt网上资料
- 安装Tair及配置测试
- Unity中使用ulua的个人经验总结
- 187. Repeated DNA Sequences
- Guava functional -- Predicate
- Linux 字符设备驱动结构(三)—— file、inode结构体及chardevs数组等相关知识解析
- Struts2(四):在Action中如何访问Web资源
- ubuntu 搜狗输入法安装
- JAVA小知识
- maven学习(五)