jQuery中的某些延迟后刷新页面 [英] Refreshing a page after certain delay in jquery
本文介绍了jQuery中的某些延迟后刷新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的问题:我需要显示一会儿消息,然后重新加载页面.有人可以告诉我在一定的延迟后如何重新加载页面吗?
here's my problem: i need to display a message for a while, and then reload the page. can someone tell me how to reload a page, after certain delay?
推荐答案
您甚至不需要jQuery或HTML5:
You don't even need jQuery or HTML5 for this:
setTimeout(location.reload.bind(location), 60000);
这将等待1分钟(60,000毫秒),然后调用 location.reload
函数,该函数是用于刷新页面的内置函数.
This will wait 1 minute (60,000 milliseconds), then call the location.reload
function, which is a built-in function to refresh the page.
这篇关于jQuery中的某些延迟后刷新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文