Extjs里的继承

 SuperClass=function()
        {           
        }
        SuperClass.prototype.AA=function()
        {
            alert('aa');
        }
       
        SubClass=function()
        {
            SubClass.superclass.constructor.call(this);           
        }
        Ext.extend(SubClass,SuperClass,
            {
                BB:function(){alert('新方法');},
                AA:function(){alert('重写方法');}
            }//配置信息主要用来重写父类的方法和添加新方法
        );
       
        var sub=new SubClass();
        sub.AA();
        sub.BB();
posted @ 2008-07-24 19:56  kuailewangzi1212  阅读(601)  评论(0编辑  收藏  举报