2013年10月16日
摘要: 原型式继承对象的构造函数可以从其他对象中继承方法,它创建出一个原型对象后,所有其他的新对象都可以基于这个原型对象来构建。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... 阅读全文
posted @ 2013-10-16 22:02 happinessqi 阅读(130) 评论(0) 推荐(0) 编辑