摘要:
原型式继承对象的构造函数可以从其他对象中继承方法,它创建出一个原型对象后,所有其他的新对象都可以基于这个原型对象来构建。function Person (name) { this.name =name;}Person.prototype.getName= function () { return this.name};function User(name,password) { this.name = name; this.password = password;}User.prototype = new Person();User.prototypoe.getPassword = fu... 阅读全文