function inherit (Target,Origin) {
function F () {};
F.prototype = Oringin.prototype;
Target.prototype = new F ();
Target.prototype.constructor = Target;
Target.prototype.uber = Origin.prototype
}
Father.prototype.lastName = "deng";
function Father () {
}
funtion Son () {
}
inherit(Son,Father)
var son = new Son();
var father = new Father;
圣杯模式
最新推荐文章于 2020-11-29 21:54:49 发布