How can I refresh a page with jQuery?

后端 未结 28 2462
刺人心
刺人心 2020-11-22 07:00

How can I refresh a page with jQuery?

28条回答
  •  伪装坚强ぢ
    2020-11-22 07:36

    Use 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. The parameter defaults to false, so by default the page may reload from the browser's cache.

提交回复
热议问题