How do I refresh my current page

This question already has an answer here:

  • How can I refresh a page with jQuery? 16 answers

  • Yes you can refresh like this location.reload()

    As you are using jquery mobile and don't want to use reload try changePage as below:

    var url = location.href;
    if (url.indexOf('?r=1') != -1 || url.indexOf('&r=1') != -1) {
      url = url.replace('?r=1', '?').replace('&r=1', '');
    } else {
        if (location.href.indexOf('?') == -1) {
            url = url + '?r=1';
        } else {
            url = url + '&r=1';
        }
    }
    $.mobile.changePage(url);
    
    链接地址: http://www.djcxy.com/p/28668.html

    上一篇: 如何使用JavaScript重新加载页面?

    下一篇: 如何刷新我的当前页面