标签:实现继承 asc fat cto tor prototype new turn 实现
1. 原形链
2.借用构造函数
3.组合继承
4.寄生式继承
5.寄生组合式继承
function object(o){
function F() {}
F.prototype = o;
return new F();
}
function inherit Prototype(Children, Father){
var prototype = (Father.prototype);
prototype.constructor = Children;
Children.prototype = prototype;
}
标签:实现继承 asc fat cto tor prototype new turn 实现
原文地址:http://www.cnblogs.com/LionheartCGJ/p/6227339.html