如何使用 jQuery 刷新页面? [英] How can I refresh a page with jQuery?
本文介绍了如何使用 jQuery 刷新页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用 jQuery 刷新页面?
How can I refresh a page with jQuery?
推荐答案
$('#something').click(function() {
location.reload();
});
reload()
函数采用一个可选参数,该参数可以设置为 true
以强制从服务器而不是缓存重新加载.该参数默认为 false
,因此默认情况下页面可能会从浏览器的缓存中重新加载.
The reload()
function takes an optional parameter that can be set to true
to force a reload from the server rather than the cache. The parameter defaults to false
, so by default the page may reload from the browser's cache.
这篇关于如何使用 jQuery 刷新页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文