setInterval会消耗网页内存,如果不清理会一直消耗直到网页卡死。

解决办法:

先清除定时器再创建一个定时器

clearInterval(t);

t=setInterval(ajax,10000);

相关文章: