-3

我在 html 中创建了 3 到 4 个不同的页面。在导航到第三页;在特定事件上,我想刷新该页面。可能吗?如果是的话,你能帮我写代码吗?

提前致谢

干杯

4

1 回答 1

-1

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);
于 2013-07-22T18:54:43.487 回答