浏览器网页定时刷新代码教程分享

浏览器网页定时刷新代码教程分享,只需要一段js代码 首先F12打开控制器面板,复制刷新代码 timeout=prompt("Set timeout (Second):"); count=0 current=location.href; if(timeout>0)...

浏览器网页定时刷新代码教程分享,只需要一段js代码

首先F12打开控制器面板,复制刷新代码

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

粘贴进入 回车,会弹出刷新时间,单位是秒设置后即可自动刷新

  • 发表于 2021-02-06 11:00
  • 阅读 ( 954 )
  • 分类:互联网

0 条评论

请先 登录 后评论
小先生
小先生

724 篇文章

你可能感兴趣的文章

相关问题