var panel=new Ext.TabPanel({width:700,height:200,items:[{title:"运价信息",height:30,html:'<h1>Hello,easyjf open source</h1>'},{title:"运期信息",height:30 ,html:'<h1>sssssssssssssss</h1>'},{title:"关税信息",height:30,html:'<h1>bbbbbbbbbbbbbbb</h1>'},{title:"收费信息",height:30,html:'<h1>dddddd</h1>'}]});
panel.render("lapel");
});
怎样使第一个标题初始时被选中的?因为这个刚进入页面的时候都没选中里面的内容也是空白··

解决方案 »

  1.   


    var panel=new Ext.TabPanel({width:700,height:200,activeTab:0,items:[{title:"运价信息",height:30,html:'<h1>Hello,easyjf open source</h1>'},{title:"运期信息",height:30 ,html:'<h1>sssssssssssssss</h1>'},{title:"关税信息",height:30,html:'<h1>bbbbbbbbbbbbbbb</h1>'},{title:"收费信息",height:30,html:'<h1>dddddd</h1>'}]});
            panel.render("lapel");
    });
      

  2.   

    var panel=new Ext.TabPanel({width:700,height:200,activeTab:0,items:[{title:"运价信息",height:30,html:'<h1>Hello,easyjf open source</h1>'},{title:"运期信息",height:30 ,html:'<h1>sssssssssssssss</h1>'},{title:"关税信息",height:30,html:'<h1>bbbbbbbbbbbbbbb</h1>'},{title:"收费信息",height:30,html:'<h1>dddddd</h1>'}]});
            panel.render("lapel");
    });