« celeon | 首页 | 顺其自然 »

555555555

留言(2 条)

2010年我的网志总结 留言:

感觉2010我做的很差,本来有机会做得好的。。。

顶下楼主。。

Javascript面向对象编程(二):构造函数的继承 留言:

 function extend(Child, Parent) {

    var F = function(){};
    F.prototype = Parent.prototype;
    Child.prototype = new F();
    Child.prototype.constructor = Child;
    Child.uber = Parent.prototype;
  }

这个好像parent必须实现prototype方法,