Ext.extedの使用


function A(id){
	this.id = id;
}
//A.prototype.said = function(){
//	document.write(id);
//}
A.prototype = {
	said : function(){
		document.write(this.id);
	}
}

function B(id){
	B.superclass.constructor.call(this, id);
}

Ext.extend(B, A, {
	//     said  
	said : function(){
		document.write(String.format("B:{0}", this.id));
	}
});

document.write("   said  :");
var obj1 = new A("obj1");
obj1.said();
document.write("<br/>       said  :");
var obj2 = new B("obj2");
obj2.said();