摘要:
Person类:function Person(name,age){ this.name = name; this.age = age;}Prototype 继承:Person.prototype.showName = function(){ console.log("my Name is: " + this.name);}输出:var people = new Person("chams",22);people.showName(); //out: my Name is: chamsStudent类:function Student() {}Proto 阅读全文