简单继承:
function A(x){
this.x=x;
}
function B(x,y){
this.tmpObj=A;
this.tmpObj(x);
delete this.tmpObj;
this.y=y;
}
完美继承:
function AA(x){
this.x = x;
}
AA.prototype.xxx = 2;
function Obj(){
AA.call(this,22);
this.cc = 11;
this.constructor = arguments.callee;
}
Obj.prototype = new AA();
var obj = new Obj();