我在JS中聲明了一個json數(shù)據(jù),然后里面又聲明了子json 類型數(shù)據(jù),想在里面綁定父級的數(shù)據(jù),但是綁定失敗 是什么原因呢?? 直接看圖,var json = {type: 2,scity_3: '',scity: '杭州',ecity: '',ecity_3: '',date_go: '',date_back: '',code_3_go_json: {
url: 'http://118.178.225.32/hmp_website/yiplain/getairportlist.json', parameters: { 'keywords': encodeURI(json.scity)
}, success: function (data) {
console.log(this); console.log(data);
}
},}紅色箭頭標(biāo)注部分每次直接顯示undefinde ,為什么呢,是因為只能在函數(shù)里面進行數(shù)據(jù)綁定么?
多層JSON數(shù)據(jù)為什么不能訪問
米琪卡哇伊
2018-10-22 09:13:54
