several way to implement inheritance in javascript
摘要:
1 //1.prototype chain inheritance 2 function SuperType() { 3 this.property = true; 4 } 5 SuperType.prototype.getSuperValue = function () { 6 return this.property; 7 }; 8 function SubType() { 9 this.subproperty = false;10 }11 12 //inherited from Su... 阅读全文
posted @ 2013-05-14 23:45 雷音 阅读(149) 评论(0) 推荐(0) 编辑