第一种
第二种
第三种
var myObject =
{ "name1":"ddA",
"name2":"Add"
};
第二种
var Animals = new Object();
Animals.name = "dog";
Animals.sex = "Male";
Animals.age = "2";
第三种
function Man()
{
this.name = "big pig";
this.age = 20;
this.standing;
this.bust;
this.waist;
this.hip;
}
//使用prototype prototype表示是对父级的引用
function Girl(){}
Girl.prototype.name = "big pig";
Girl.prototype.age = 20;
Girl.prototype.standing;
Girl.prototype.bust;
Girl.prototype.waist;
Girl.prototype.hip;