Fork me on GitHub

几种网页重定向(自动跳转)的方法

1 纯html法

<html>
<head> 
<meta http-equiv="Refresh" content="2; url=http://www.baidu.com" />   2秒后开始
</head>  
<body> 
    Loading... 
</body> 
</html>

 

2 javaScript法

<script>
    location = "http://www.baidu.com";     或者window.location、 document.location
</script>

 

3 PHP法

<?php 
    Header( "Location: http://www.baidu.com" ); 
?> 

 

posted @ 2016-05-19 18:21  Roronoa__Zoro  阅读(772)  评论(0编辑  收藏  举报