当前位置:网站首页 / 电脑技术 / 正文

chrome浏览器网页自动刷新console代码

时间:2018年08月25日 | 作者 : liuhui | 分类 : 电脑技术 | 浏览: 7810次 | 评论 0

阿里云限量代金券 | 此广告位出租25元/月

代码使用说明: 

这个代码直接贴到chrome或者firefox的控制台中,按F12键进入Console,复制下面代码回车,输入自动刷新的时间间隔(单位秒),即可实现自动刷新,直到你关掉页面或者手工刷新界面为止。

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())};
}


推荐您阅读更多有关于“”的文章

猜你喜欢

网站分类
关注电脑博士
友情链接

分享:

支付宝

微信