AJAX Interval Refresh?

前端 未结 5 1844
余生分开走
余生分开走 2020-12-08 23:57

I\'m trying to make an AJAX function update about 30 seconds. I have a simple version of that done, here is the code.

var refInterval = window.setInterval(\'         


        
5条回答
  •  有刺的猬
    2020-12-09 00:58

    Call update once (on document ready) before calling it with the interval:

    update();
    
    var refInterval = window.setInterval('update()', 30000);
    

提交回复
热议问题