js倒计时跳转页面

var t=10;
setInterval(function refer(){
	if(t>0){
	  document.getElementById("em").innerHTML = t;
	  t--
	}else{
	    location="http://www.baidu.com"
	}
},1000)

  

原文地址:https://www.cnblogs.com/lixiaoxing/p/5550342.html