1
我寫的JS(阿賈克斯)代碼:的Json數組JavaScript和Ajax
阿賈克斯回到我記錄JSON在陣,看起來就像這樣:
sport_id:
[{"id":110,"sport_id":1,"league_id":32}]
league_id:
[{"id":110,"sport_id":1,"league_id":32}]
我不能讓只有sport_id
和league_id
。我想從這個主題enter link description here添加代碼:
if(sport_id[i]._type[0]=='sport_id'){
currentObj = pushNew(sport_id[i].nodeValue);
}
但我回來了錯誤:
statusText: OK Status: 200 readyState: 3
史迪威我有這同樣的錯誤:狀態文本:OK狀態:200 readyState:3 – michal
我已更新代碼。我認爲你的數據格式不是標準的,意味着JSONP –