开发者

How to make simultaneous ajax request to get JSON content from different URL's

I need to make 10 simultaneous ajax request to get JS开发者_StackOverflowON content from different URL's. Each request response is not dependent on each others. In this case how do I manage those requests?? I try using AjaxManager plugin but I can't configure it right to get JSON results.

Any help is very much appreciated! Please let me know if I can provide any more information. Thanks!


I think you can simply use the '$.get();' method multiple times and it works simultaneously completely independent on each other. just as simple as that.
just like this...

$.get('myURL',function(data){
//do sth
});
$.get('myUrl2',function(data){
//do sth else
});


I think the real question is, just how simultaneous do they need to be? You can make them a bit less asynchronous by starting some of the requests on others' callbacks.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜