比较经典的继承方式

1 function inherit(subClass,supperClass){
2     function temp(){};
3     temp.prototype = supperClass.prototype;
4     subClass.prototype = new temp();
5     subClass.prototype.constructor = cubClass;
6 }

 

posted on 2013-04-08 20:49  罪恶  阅读(128)  评论(0编辑  收藏  举报

导航