页面定时跳转一个 html 示例 是js 做的,求高手指教
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="author" content="钟艳明,962589149" />
<title>reload</title>
<script type="text/javascript">
function timerGo(obj)
{
alert("该网址已经更新为http://www.baidu.com,系统5秒内自动跳转该页面");
togetDown(5);
//clearTimeout(togetDown());
}
function togetDown(misc){
document.getElementById("tiao").innerHTML=misc;
if(--misc>0){
setTimeout("togetDown("+misc+");",1000);
}else
{
window.location.href="http://www.baidu.com";
}
}
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF33CC}
.STYLE3 {font-size: 50px}
.STYLE4 {font-size: 24px}
-->
</style>
</head>
<body onload="timerGo(this);">
<center>
<span class="STYLE3">还剩 </span>
<div class="STYLE1" id="tiao" style="border:#CCCCCC solid 1px; width:300px; height:200px; font-size:200px; font-weight:bold; text-align:center;">0</div>
<p><span class="STYLE3">秒,跳转到<a href="http://www.baidu.com">http://www.baidu.com </a> </span> </p>
<p class="STYLE4">如果页面未自动跳转,请点击
<a href="http://www.baidu.com">http://www.baidu.com</a> 进行跳转 </p>
</center>
</body>
</html>
很遗憾的是,不知道如何让DIV 有种动态的感觉。求高手指点,在线等
类似进度条一样的 最好了
浙公网安备 33010602011771号