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

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

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

timeout=prompt("Set timeout (Second):");count=0current=location.href;if(timeout>0)setTimeout('reload()',1000*timeout);elselocation.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())};}

原创文章,作者:陌涛,如若转载,请注明出处:https://imotao.com/2107.html

(0)
陌涛的头像陌涛
上一篇 2020年4月21日 下午1:24
下一篇 2020年4月21日 下午1:28

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据