如题  
  有哪位前辈知道的,请告诉我,感激不尽!

解决方案 »

  1.   

        var tabs = Ext.widget('tabpanel', {
           id:'main_tab', 
            resizeTabs: true,
            enableTabScroll: true,
            width: 800,
            defaults: {
                autoScroll: true,
                bodyPadding: 10
            },
            items: [{
               id:'123',
                title: 'Asino',
                html: '<Asino>',
                closable: false
            }],
                margins:'5 0 5 5'
        });
    ///////////得到当前
    tabs.getActiveTab().title;
      

  2.   

     Ext.onReady(function () {
                    Ext.create('Ext.tab.Panel', {
                        width: 400,
                        height: 400,
                        renderTo: document.body,
                        items: [{
                            title: 'Foo'
                        }, {
                            title: 'Bar',
                            tabConfig: {
                                title: 'Custom Title',
                                tooltip: 'A button tooltip'
                            }
                        }],
                        buttons: [{
                            'text': 'abc',
                            handler: function () {
                                var tab = this.up('tabpanel').getActiveTab();
                                var idx = this.up('tabpanel').items.indexOf(tab);
                                alert(idx);
                            }
                        }]
                    });
                });