function getItems(url) {
$.ajax({
url: url,
type: "GET",
headers: {
"accept": "application/json;odata=verbose",
},
success: function(data) {
//console.log(data);
for(var i=0;i<data.d.results.length;i++){
console.log(data.d.results[i].Number);
}
if (data.d.__next) {
getItems(data.d.__next);
}
},
error: function(jqxhr) {
alert(jqxhr.responseText);
}
});
}
getItems(_spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle(‘Association‘)/items");
原文:https://www.cnblogs.com/Nigel/p/10683543.html