嗨,我有以下代码:
$.ajax({'type':'POST', 'url':'https://www.123.com/site/gethistory',
'data':{'a': this.username, 'b': username},
'success':function(history){
alert(history);
var codes = jQuery.parseJSON(history);
$.each(codes, function(key, value) {
alert(key);
}); //each
},
'error':function(){
}
}); //ajax
现在密钥未定义。我试图提醒(value.text),它仍然给我未定义。
历史被警告为:
[{"demo":{"text":"hi man","time":"1380167419"},"admin":{"text":"hi","time":"1380167435"},"demo" :{"text":"这现在完美无缺。","time":"1380167436"},"demo":{"text":"我们基本上完成了这个/","time":"1380167443"} }]