浏览器控制台自动刷新网页脚本

timeout=prompt("Set timeout (Second):");
count=0
current=location.href;
if(timeout>0)
setTimeout('reload()',1000*timeout);
else
location.replace(current);
function reload(){
setTimeout('reload()',1000*timeout);
count++;
console.log('每('+timeout+')秒自动刷新,刷新次数:'+count);
fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>';
fr4me+='</frameset>';
with(document){write(fr4me);void(close())};

}

把这段js粘到chrome等浏览器控制台,回车,设置刷新时间即可;

版权所有:《太阳花工作室》 => 《浏览器控制台自动刷新网页脚本
本文地址:http://bg.artuion.com/代码/375.html
除非注明,文章均为 《太阳花工作室》 原创,欢迎转载!转载请注明本文地址,谢谢。