欢迎访问我的独立博客

html php 重定向 跳转 刷新

1秒后跳转
法一:
<!DOCTYPE HTML>
<html>
<head>    
<meta http-equiv="refresh" content="1;url=http://wiki.elesos.com">   
</head>
</html>
2,js实现
<script>   
// 以下方式直接跳转  
window.location.href='http://wiki.elesos.com';  
// 以下方式定时跳转  
setTimeout("javascript:location.href='http://wiki.elesos.com'", 1000);   
</script> 


使用content属性表示刷新或跳转的开始时间与跳转的网址

5秒之后刷新本页面:

<meta http-equiv="refresh" content="5" /> 

5秒之后转到首页:

<meta http-equiv="refresh" content="5; url=http://www.elesos.com/" />
php跳转与定时跳转
header("Location: $httpfile");
header("refresh:1;url=$httpfile");
posted @ 2016-10-10 17:34  github.com/starRTC  阅读(369)  评论(0编辑  收藏  举报