摘要:
先介绍目前在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... 阅读全文