This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12188|Reply: 0

[JavaScript] console automatically refreshes the current page

[Copy link]
Posted on 12/7/2015 6:45:35 PM | | | |


  1. timeout=prompt("Set timeout [s]");
  2. current=locatio{过滤}n.href;
  3. if(timeout>0)
  4. setTimeout('reload()',1000*timeout);
  5. else
  6. locatio{过滤}n.replace(current);
  7. function reload(){
  8. setTimeout('reload()',1000*timeout);
  9. fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>';
  10. fr4me+='</frameset>';
  11. with(document){write(fr4me);void(close())};
  12. }
Copy code
console自动刷新.txt (336 Bytes, Number of downloads: 5, 售价: 1 粒MB)




Previous:Understand input, output, forward, and prohibiting pings
Next:Nginx domain name access judgment
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com