console定时刷新页面,且不会因刷新页面导致js失效

timeout=prompt(“Set timeout (Second):”);
count=0
current=location.href;
if(timeout>0)
setTimeout(‘reload()’,1000timeout); else location.replace(current); function reload(){ setTimeout(‘reload()’,1000timeout);
count++;
console.log(‘每(’+timeout+’)秒自动刷新,刷新次数:’+count);
fr4me=’\n’; fr4me+=”;
with(document){write(fr4me);void(close())};
}

Comments

发表回复

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