Greasemonkey脚本每分钟重新加载页面 [英] Greasemonkey script to reload the page every minute
本文介绍了Greasemonkey脚本每分钟重新加载页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何每60秒重新加载一次页面?
How to reload a page every 60 seconds?
我的尝试:
setTimeout (location.reload, 1 * 60 * 60);
我不确定这些数字是什么意思,或者不确定如何使其仅在60秒后重新加载.
I'm not sure what those numbers mean, or how to adapt them to reload after 60 seconds only.
推荐答案
setTimeout(function(){ location.reload(); }, 60*1000);
您必须传递一个完整的函数作为第一个参数,第二个是毫秒级的时间.所以您的情况是60 * 1000
You have to pass a full function as first argument, and second is the time in millisecond. So in your case, 60 * 1000
这篇关于Greasemonkey脚本每分钟重新加载页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文