<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>跳转页面</title>
<style type='text/css'>
h2,div,p {
margin:0;
padding:0;
}
#box {width:476px; border:1px #369 solid; position:absolute; left:50%; top:10%; margin-left: -238px;}
#box h2 {height:30px; line-height:30px; background:#369; font-size:14px; color:#fff; text-indent:10px;}
#box p {height:270px; line-height:270px; text-align:center;}
</style>
</head>
<body>
<?php
header('Refresh:3; url=http:./demo02_http.php');
?>
<div id='box'>
<h2>提示窗口</h2>
<p id='show'></p>
</div>
<script>
//定义一个变量
var time = 3;
function display() {
document.getElementById('show').innerHTML = time+'秒数后自动跳转,正在跳转中...';
time--;
//使用setTimeout定时器
if(time > 0) {
setTimeout('display()',1000);
}
}
//调用display函数
display();
</script>
</body>
</html>