Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
203 views
in Technique[技术] by (71.8m points)

javascript - 如何使用jQuery刷新页面?(How can I refresh a page with jQuery?)

如何使用jQuery刷新页面?

  ask by luca translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use location.reload() :

(使用location.reload() :)

$('#something').click(function() {
    location.reload();
});

The reload() function takes an optional parameter that can be set to true to force a reload from the server rather than the cache.

(reload()函数采用一个可选参数,可以将其设置为true以强制从服务器而不是从缓存重新加载。)

The parameter defaults to false , so by default the page may reload from the browser's cache.

(该参数默认为false ,因此默认情况下该页面可能会从浏览器的缓存中重新加载。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...