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);
}
精彩评论