var url='http://123';
xhr.open('GET', url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var response = JSON.parse(xhr.responseText);
// 处理响应数据
console.log(response);
var list_all=response.data.list;
console.log(list_all.length);
for(var i=0; i<list_all.length;i++){
(function(i) {
setTimeout(function() {
}, i * 1500);
})(i);
}
}
};
xhr.send();
原生js进行接口请求
最新推荐文章于 2025-02-17 00:40:06 发布
1316

被折叠的 条评论
为什么被折叠?



