// 类库
var ajax = function (url, success, error) {
...
}
var items = [...];
var A = function (A, callback, error) {
....
ajax("...", callback, error)
};
var i=1;
var next = function (callback) {
if (i>=items.length) {
throw "ERROR";
} else {
A(items[i++], callback, next);
}
};
next(function () {
blahblah
});
【 在 Sunshow (忘了就好) 的大作中提到: 】
: function A(item, callback) {
: //AJAX
: }
: ...................
--
FROM 221.221.165.125