2014年4月10日

javascript中的继承-原型链

摘要: 先上代码:function SuperType(){ this.property=true;}SuperType.prototype.getSuperValue=function(){ return this.property;};function SubType(){ this.subproperty=false;}SubType.prototype=new SuperType(); //这里继承了SuperTypeSubType.prototype.getSubValue=function(){ return this.subproperty;}va... 阅读全文

posted @ 2014-04-10 09:45 nU|| 阅读(1227) 评论(0) 推荐(0) 编辑

导航