摘要: 先介绍目前在ECMAScript中使用最广泛,认同度最高的默认模式。1.组合使用构造函数及原型function Person(name,age,job){ this.name = name; this.age = age; this.job = job; this.friends = ["Shelby","Court"];}Person.prototype = { constructor : Person, sayName : function(){ alert(this.name); }}var person1 = new Person... 阅读全文
posted @ 2013-05-20 15:06 花落红尘 阅读(2004) 评论(5) 推荐(4) 编辑