var Timer;
function loadPage(){
Timer=setInterval('countDown()',1000); //每隔1秒执行一次
}
var sec=4;
function countDown(){
if(sec>0){
document.getElementById("num").innerHTML=sec--;
}www.2cto.com
else{
clearInterval(Timer); //清除定时器
location.href="http://qiuqiuyifang.taobao.com/";
}
}
4秒钟后跳转到百度首页
4