Hello everybody, then introduce the foundation of ExtJS, TabPanel component everybody likes it!
(Temporary home 2 hours.)
As usual, look at the simplest first, and then elaborate on the details later!
Effect Picture:
JS Code:
Ext.onready (function () {
var tabsdemo=new ext.tabpanel ({
RenderTo:Ext.getBody (),
WIDTH:300,
activetab:0,//Current Activation tab
Frame:true,
items:[{
Contentel: "TabOne",//tab page element ID (add what you want to show)
Title: "The Wave of the Sunrise",
closable:true//whether the button is realistic to turn off the default is False
},{
Contentel: "Tabtwo",
Title: "How are the brothers in the blog park?"
}]
});
});
HTML code:
<body style= "margin:10px;" >
<div>
<div id= "TabOne" class= "X-hide-display" >i am tabone!</div>
<div id= "Tabtwo" class= "X-hide-display" >i am tabtwo!</div>
</div>
</body>
<!--note class type, set to X-hide-display for normal display-->
Here are some examples of arguments:
//几个相关参数
1.tabPosition:"bottom"//选项卡的位置,枚举值bottom,top.默认为top(只有top的时候才能选项卡的滚动!)
2.tabTip:"提示"//必须先调用Ext.QuickTips.init();才有效果
Often we have a situation where a tab loads a page, and here I provide a simple method that is not very good but stable (no problem has been validated in the project).
is: Use the IFRAME as tab content.
1. TabPanel with an IFRAME to load other complete pages.