-
-
韦韬然 数据老手Lv5
发表于2018-10-10 17:57
楼主
timeout=prompt("输入刷新间隔(毫秒):");
count=0
current=location.href;
if(timeout>0)
setTimeout('reload()',timeout);
else
location.replace(current);
function reload(){
if(count<=1000){
setTimeout('reload()',timeout);
count++;
console.log('每('+timeout+')毫秒自动刷新,刷新次数:'+count);
fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>';
fr4me+='</frameset>';
with(document){write(fr4me);void(close())};}
else{
location.replace(current);}
}
输入的毫秒数过小的话会很卡?不建议输入1000毫秒一下的数值。
使用方法,直接在需要刷新的页面使用这个js脚本即可,停止方式:1000次后自动停止,后退以及关闭页面也可以
count=0
current=location.href;
if(timeout>0)
setTimeout('reload()',timeout);
else
location.replace(current);
function reload(){
if(count<=1000){
setTimeout('reload()',timeout);
count++;
console.log('每('+timeout+')毫秒自动刷新,刷新次数:'+count);
fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>';
fr4me+='</frameset>';
with(document){write(fr4me);void(close())};}
else{
location.replace(current);}
}
输入的毫秒数过小的话会很卡?不建议输入1000毫秒一下的数值。
使用方法,直接在需要刷新的页面使用这个js脚本即可,停止方式:1000次后自动停止,后退以及关闭页面也可以
10个回答
我在想如果把间隔调的比较短再把次数调多,这样会不会把论坛的服务器弄宕机呢
