开发者

ajax techniques

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜