目前第一次使用JSON工作並且幾乎沒有jQuery的經驗。 我有這個功能大幹快上$阿賈克斯要求的「成功」觸發:jQuery JSON解析 - 「對象未定義」
function(data) {
$.each(data.notifications, function(notifications) {
alert('New Notification!');
});
}
但是我在Firebug控制檯說明得到一個錯誤「的對象是不確定的」,「長度= object.length」。
的JSON的反應是:
["notifications",[["test would like to connect with you",{"Accept":"\/events\/index.php\/user\/connection?userId=20625101&action=accept","Decline":"\/events\/index.php\/user\/connection?userId=20625101&action=decline"}]]]
我想這事做與[]
S上的數字,但JSON是由PHP使用json_encode編碼()
任何幫助,將不勝感激!
謝謝:)
太棒了!謝謝你的幫助 :) –