设置计时器代码如下:
var ssh;
if (window.localStorage.getItem('SetUser') == null) {
//setInterval("ajax_load_select_user(1, 2);", 5000);
} else {
ssh= setInterval("TimeLoad()", 1000);
}
function TimeLoad() {
//执行方法
ajax_SetUserSava_Load(1, 8, window.localStorage.getItem('SetUser'));
}
计时器的关闭
window.clearInterval(ssh);