更新时间:2022-06-04 06:49:45
您可以使用的延期对象的 [文档] jQuery的1.5介绍:
You can make use of deferred objects [docs] introduced in jQuery 1.5:
$.when(
$.get('address1', function() { ... }),
$.get('address2', function() { ... }),
$.get('address3', function() { ... })
).then(function() {
alert('Finished');
});
参考: jQuery.when
jQuery的学习中心有一个很好的介绍推迟对象/ 的承诺
The jQuery learning center has a nice introduction to deferred objects / promises.