延迟一段时间执行特定代码:
setTimeout(function () { window.location.href = 'login' },1200);
循环执行:
function test(){ XXX; } setInterval(test,5000);