SetInterval_1

window.onload = function () {
timer = setInterval(autoRedirect, 1000);
}
var timer = null;
var flag = 5;

function autoRedirect()
{
lb.innerText = flag.toString() + "faf";
flag = flag - 1;

if (flag == 0) {
location.href = "../Users/Home.aspx";
clearInterval(timer);
}
}

posted @ 2014-10-20 23:11  yemaxu  阅读(139)  评论(0编辑  收藏  举报