 
		这毛病得改改了
2015-06-17 20:55
var F = function(){};
F.prototype = Animal.prototype;
Cat.prototype = new F();
Cat.prototype.constructor = Cat;
alert(Cat.prototype.constructor);//Cat
alert(Animal.prototype.constructor);//Animal 
				原型继承机制有点,牵线传输的味道.
JavaScript深入浅出
281087 学习 · 1054 问题
相似问题