How can I refresh a page with jQuery?

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

How can I refresh a page with jQuery?

28条回答
  •  醉梦人生
    2020-11-22 07:36

    To reload a page with jQuery, do:

    $.ajax({
        url: "",
        context: document.body,
        success: function(s,x){
            $(this).html(s);
        }
    });
    

    The approach here that I used was Ajax jQuery. I tested it on Chrome 13. Then I put the code in the handler that will trigger the reload. The URL is "", which means this page.

提交回复
热议问题