js-json教程从入门到使用
2.json例子:
var today_data={
"city":"上海",
"area":"6400",
"person":"1800", "testData":{"city2":"民兴渠","area":"2_6500"} }; function showcity(data){alert("城市:"+data.city+"面积:"+data.area+"---第二层城市:"+data.testData.city2+"---第二层数字:"+data.testData.area);} showcity(today_data); console.log( typeof today_data);