简体   繁体   English

每次加载后自动刷新页面

[英]Auto refresh a page every time after it loads

I'm looking for a script which loads a URL and auto refreshes it as soon as it's completely loads.我正在寻找一个加载 URL 并在完全加载后自动刷新它的脚本。 Timer wont work, as the load time of page will be different every time.计时器不起作用,因为页面的加载时间每次都会不同。

 window.onload = function () {window.location.reload()}

Please help me to modify this script to be able to do that.请帮我修改这个脚本以便能够做到这一点。

Thanks.谢谢。

Try this code试试这个代码

setTimeout(function(){ document.location.reload();}, 6000);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM