ExtJS-3.4.0系列:Ext.TabPanel

1、Ext.TabPanel简单使用

代码:

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Header{
    <script type="text/javascript">
        Ext.onReady(function () {
            var tabs = new Ext.TabPanel({
                renderTo: Ext.getBody(),
                width: 300,
                height: 150
            });

            tabs.add({
                title: '标题1',
                html: '内容1'
            });

            tabs.add({
                id: Ext.id(),
                title: '标题2',
                html: '内容2',
                closable: true
            });

            tabs.activate(0)
        });
    </script>
}

效果图:

posted @ 2012-10-02 14:13  libingql  阅读(2884)  评论(2编辑  收藏  举报