How to force page refreshes or reloads in jQuery?

前端 未结 5 1206
误落风尘
误落风尘 2020-12-14 05:26

The code below displays a Google map and search results when you enter an address and hit the submit button. I\'ve been playing with it to try and force the page to complet

5条回答
  •  醉梦人生
    2020-12-14 06:18

    Replace that line with:

    $("#someElement").click(function() {
        window.location.href = window.location.href;
    });
    

    or:

    $("#someElement").click(function() {
        window.location.reload();
    });
    

提交回复
热议问题