1、meta标签实现 只需在head里加上下面这一句就行了,在当前页面停留0.1秒后跳转到目标页面
1 | <meta http-equiv="refresh" content="0.1; url=http://baidu.cn/"> |
2、Javascript实现
方法一:这个方法比较常用
1
window.location.href = "http://baidu.cn/";
方法二:
1
self.location = "http://baidu.cn/";
方法三:
1
top.location = "http://baidu.cn/";
方法四:
只对IE系列浏览器有效,实用性不大1
window.navigate("http://baidu.cn/");
3、php实现
1 | <?php |