JS_0057:JS 循环判断 到指定时间范围执行 JS正则全局替换字符串
1,
// 渲染器每一小时循序一次,当累计使用时间超过23小时,执行到凌晨6点后重置页面的功能 var thisDate; var dateNum = 0; setInterval(function(){ dateNum++; thisDate = new Date(); if(140 < dateNum && 6 == thisDate.getHours() && (0 <= thisDate.getMinutes() && thisDate.getMinutes() < 60)){ window.location.href="index.html"; // 重置程序到登录页面 }; },3600000);
2,全局替换字符串
str = str.replace(/MyEditorSpace\/BUpdateEXEC\//g,"");
琥珀君的博客