function pri (num) { return new Promise((resolve,reject) => { console.log('开始'+num) resolve(num) }) } const list = [1,2,3] function done(list,cb){ list.reduce((s,v) => { return s.then(res => { console.log(res) if (re
使用JQuery对多个ajax请求串行执行. HTML代码: <a href="#">Click me!</a> <div></div> JS: function GetSomeDeferredStuff() { var deferreds = []; var i = 1; for (i = 1; i <= 10; i++) { var count = i; deferreds.push( $.post('/echo/html/',