倒计时页面跳转

 <HTML>
<HEAD>
<META http-equiv='Content-Type' content='text/html; charset=gb2312'>
<TITLE>ly</TITLE>
<script>
 var c=setInterval(fc,1000);
var i=4;
function   fc(){  
var id=document.getElementById("f");
id.innerText=i;
i--;
if(i==-1){
  clearInterval(c);
 window.location = " http://yaotoo.taobao.com/";
}   
}
</script>
</HEAD>
<body>
<div id="f">4秒后返回我的淘宝店,谢谢大家光临</div>
<body>
</html>

你可能感兴趣的:(c,function)