最优化: 圣杯模式
function inherit( Target , Origin){
function F();
F.prototype = Origin.prototype;
Target.prototype = new F();
Target.prototype.constructor = Target; //把Target的构造函数指向归位
Target.prototype.uber= Origin.prototype; //为了让我们知道Target真正继承自谁
}
var inherit = (function(){
var F =function (){} ;
return function(Target,Origin){
F.prototype = Origin.prototype;
Target.prototype.constructor = Target;
Target.prototype.uber = Origin.prototype;
}
}())