Ext.extend的使用
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();