标签:F12 $.ajax IV link name children dhs child http
js array and for each
https://blog.csdn.net/zdhsoft/article/details/54017183
Chrome 42 或更新的版本支持 Fetch API 了, F12 打开 Console :
> fetch(new
Request(‘///foo.com/bar‘,{method:‘POST‘})).then((resp)=>{console.log(resp)})
fetch(new Request(‘https://trialucampus.unipus.cn/admin/educlass/startStatus?eId=1098&school_id=6‘,{method:‘GET‘})).then((resp)=>{console.log(resp)})
$.ajax({
url: ‘https://trialucampus.unipus.cn/admin/educlass/startStatus?eId=1098&school_id=6‘,
type: ‘GET‘,
success: function(data) {
console.log(‘success!‘);
},
error: function(data) {
console.log(‘error‘);
}
})
$.ajax({
url: ‘https://trialucampus.unipus.cn/admin/educlass/stopStatus?eId=1098&school_id=6‘,
type: ‘GET‘,
success: function(data) {
console.log(‘success stop!‘);
},
error: function(data) {
console.log(‘error stop‘);
}
})
var array = [1,2,3]
for (var i = 0; i < array.length; i) {
console.log(i,array[i]);
}
var array=[1565, 1566] array.forEach(v=>{ console.log(v); $.ajax({ url: ‘https://trialucampus.unipus.cn/admin/educlass/stopStatus?eId=‘+v+‘&school_id=6‘, type: ‘GET‘, success: function(data) { console.log(‘success stop!‘); }, error: function(data) { console.log(‘error stop‘); } }) });
Request URL:https://trialucampus.unipus.cn/admin/educlass/startStatus?eId=1098&school_id=6
Request Method:GET
Request URL:https://trialucampus.unipus.cn/admin/educlass/stopStatus?eId=1098&school_id=6
Request Method:GET
post/get in console of JSarray
标签:F12 $.ajax IV link name children dhs child http
原文地址:https://www.cnblogs.com/SZLLQ2000/p/9216715.html