【发布时间】:2016-07-23 22:25:32
【问题描述】:
所以我想在 jquery 中执行一个延迟的 ajax 请求,直到我收到特定的服务器响应(非空)。我该怎么做呢?
while (data.response != null) {
$.ajax(..).done(function(data);
}
function doUntilResult() {
Server.doA().done(function(data) {
Server.doB(data).done(function(result) {
//if result == null, repeat again
});
});
}
【问题讨论】:
标签: jquery ajax asynchronous deferred