开发者

ajax techniques

开发者 https://www.devze.com 2023-02-28 22:06 出处:网络
How can I use ajax to periodically (every 10 seconds) retrieve data from a开发者_如何学JAVAn XML document?The same way as usual but with the addition of setIntervalAjax function can operate same as ja

How can I use ajax to periodically (every 10 seconds) retrieve data from a开发者_如何学JAVAn XML document?


The same way as usual but with the addition of setInterval


Ajax function can operate same as javascript function. You can use setTimeout("func_name()",10000); to call your ajax function every 10 seconds.

example:-

function ajaxFunc(){
   //-- ajax logic
   setTimeout("ajaxFunc()",10000);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消