摘要: 创建对象,可以通过字面量、关键字new,Object.create()函数创建。 1.字面量。var o1={ name:"kxh", deal:function(){ return this.name; } }2.关键字new。var o4=new Object();o4.name="kxh1";o4.deal=function(){ return this.name;}3.Object.Create()函数。函数定义:Object.create(proto [, propertiesObject ])参数:proto:一个对象,作为新创建对象的原型。 阅读全文
posted @ 2013-04-09 17:45 白色的海 阅读(562) 评论(0) 推荐(0) 编辑