亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么多次請求的ajax數據不能push到數組里面?

為什么多次請求的ajax數據不能push到數組里面?

江城fen 2018-05-28 21:19:24
var?eugene?=?[];eugene[0]?=?'aa';eugene[1]?=?'bb';//?console.log(modelkey);//遍歷所有items,加上禁用for(var?i?=?1,len?=?allInput.length;i?<?len;i++){//?allInput[i].setDisabled(true);if(allInput[i].disabled?==?false){newarr.push(allInput[i].value);}if(parseInt(allInput[i].value)?===?xmlType){if(allInput[i].disabled?==?true){allInput[i].setDisabled(false);console.log('加載異步請求');Ext.Ajax.request({url:"resources/xmlInsert.php",method:"GET",params:?{?file_name:?fileName+'.xml',?select_num:?xmlType?,parent_file:filePath},success:function(response,opts){var?xml?=?response.responseText;eugene.push('cc');console.log(eugene)console.log(xml);return?insertKey.push(xml);console.log("成功,異步請求加載完成")//?console.log(filePath);console.log(me);Ext.MessageBox.alert('成功','已經從服務器端獲取結果');},failure:function(response,opts){Ext.MessageBox.alert("失敗",'請求超時或網絡故障,錯誤編號:?'?+?response.status);}});newarr.push(allInput[i].value);getModelKey(allInput,me);}else{Ext.MessageBox.alert("警告",'已經添加該模塊');return;}}}
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 1718 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號