jQuery Refresh/Reload Page if Ajax Success after time

前端 未结 7 582
心在旅途
心在旅途 2020-12-14 02:42

I use Jquery to make an Ajax request. The server returns Json object with value "true or false" like this:

return Json(new { success = false, JsonRe         


        
相关标签:
7条回答
  • 2020-12-14 03:46

    Lots of good answers here, just out of curiosity after looking into this today, is it not best to use setInterval rather than the setTimeout?

    setInterval(function() {
    location.reload();
    }, 30000);
    

    let me know you thoughts.

    0 讨论(0)
提交回复
热议问题