json 数据格式 javascript 复杂对象

var oCar = {

"color": "red",

"doors" : 4,

"paidFor" : true

};
复杂数据格式:
var company = {
name:
"Microsoft",
product:
"softwares",
chairman: {name:
"Bill Gates", age: 53, Married: true},
employees: [{name:
"Angel", age: 26, Married: false},
{name:
"Hanson", age: 32, Marred: true}],
readme:
function() {document.write(this.name + " product " + this.product);}
};
alert(company.name);
posted @ 2011-06-12 21:42  wangkangluo1  阅读(1033)  评论(0编辑  收藏  举报