1.
<html>
<meta http-equiv="refresh" content="3; url=index.php">
</html>
2.
<?
Header("location:index.php");
?>
//PHP自带
3.
页面跳转(javascript/php)
============================
有好几种方法:
(1)在页面中跳转:加入以下句子,2秒后跳到test.html
<meta HTTP-EQUIV=REFRESH CONTENT='2; URL=test.html'>
(2)2秒后转到ly2.php
<script>setTimeout("location.href='ly2.php'",2000)</script>
(3)在php中用header()函数跳转:
header("Location :http://www.xxx.com");
(4)用一个按钮,点击后跳转:(5种按钮)
<input type=button value=Return onClick
="javascript:location.href('URL');">
<input type=button value=Return onClick="javascript:window.location.href('URL');">
<input type=button value=Return onClick="javascript:window.location.replace('URL');">
<input type=button value=Return onClick="javascript:window.location.assign('URL');">
<input type="button" value="Return" onClick="window.location='URL'" /><!--这种最好-->
<?
//利用meta
echo "<meta http-equiv=refresh content='0; url=http://www.phpx.com'>";
?>
<html>
<meta http-equiv="refresh" content="3; url=index.php">
</html>
2.
<?
Header("location:index.php");
?>
//PHP自带
3.
页面跳转(javascript/php)
============================
有好几种方法:
(1)在页面中跳转:加入以下句子,2秒后跳到test.html
<meta HTTP-EQUIV=REFRESH CONTENT='2; URL=test.html'>
(2)2秒后转到ly2.php
<script>setTimeout("location.href='ly2.php'",2000)</script>
(3)在php中用header()函数跳转:
header("Location :http://www.xxx.com");
(4)用一个按钮,点击后跳转:(5种按钮)
<input type=button value=Return onClick
="javascript:location.href('URL');">
<input type=button value=Return onClick="javascript:window.location.href('URL');">
<input type=button value=Return onClick="javascript:window.location.replace('URL');">
<input type=button value=Return onClick="javascript:window.location.assign('URL');">
<input type="button" value="Return" onClick="window.location='URL'" /><!--这种最好-->
<?
//利用meta
echo "<meta http-equiv=refresh content='0; url=http://www.phpx.com'>";
?>