2
我正在構建Dojo移動應用程序。我有這樣一個JSON文件:用dojo顯示Json數據
{
Introduction:
[
{
title: "Introduction",
toolbar: "Page 1",
content: "cont, aabitant morbi tristique..."
},
{
title: "Introduction",
toolbar: "Page 2",
content: "contesent vel nisi ipsum..."
}
],
Services:
[
{
title: "services",
toolbar: "Page 1",
content: "Cras adipiscing sapien nec..."
}
]
}
下面的代碼打印的介紹寫在標題
dojo.xhrPost({
url: "diet.json",
handleAs: "json",
load: function(response) {
console.log(response.Introduction[0].title);
}
});
我能夠得到內的數據。我怎樣才能得到第一標題即
- 簡介
- 服務
假設我不知道服務。我如何獲得服務? – 2011-12-15 16:32:03