摘要:
通过创建一个Object实例 var person = new Object(); person.name = "zhouquan"; person.age = 21; person.sayName = function(){ console.log(this.name); }; person.sayName();//zhouquan对象字面量方式var person = { name: "zhouquan", age: 21, sayName:function(){ console.log(this.name); }};person.sayName() 阅读全文