-2
我有這樣的代碼如何訪問數組的屬性?
CODE JS:
this.on("success", function(file, responseText) {
// from backend a response will be returned for every file uploaded
var responseSuccess = [];
$.each(responseText, function(index, value) {
responseSuccess.push(value.success);
console.log(responseText["message: "+value.message ]); //here
});
});
對象具有下列形式......我把畫面更清晰瞭解
我想在控制檯中輸入以下消息
"Sorry,there was an error uploading your file"
訪問屬性的正確方法是什麼?
在此先感謝!
啊,你糾正它。我以爲我知道了:) – gurvinder372
@ gurvinder372感謝哥們。 ':)' –
第一個選項不起作用......不知何故知道爲什麼? –