var promises = [1, 2].map(function(id) { return id;});Promise.all(promises).then(function(val) { $.ajax() { data: 一次為數(shù)組里面的值 }}).catch(function(reason) { // ...});
用promise.all解決ajax異步循環(huán)請求問題
炎炎設(shè)計
2019-02-15 19:12:10