Ext学习之1_类的继承1
Ext.namespace("com.deng");
/**
?* 继承:javascript本身不支持继承,但是我们可以模拟,继承无非就是将父类的成员变量占为己有,也就是成员复制
?*/
//复制方法
var extend = function(child,father) {
??? child.prototype = father.prototype;
}
//子类
GenCrab = function(){
??? this.legs = 30;
}
extend(GenCrab,Crab);
var gc = new GenCrab();
gc.say();