こんにちは、次のコードがあります。
$.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":"こんにちは","time":"1380167419"},"admin":{"text":"hi","time":"1380167435"},"demo" :{"text":"これで問題なく動作します。","time":"1380167436"},"demo":{"text":"これで基本的には完了です/","time":"1380167443"} }]