<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Ext.Window</title>
        <link rel="stylesheet" type="text/css"
            href="/ext/resources/css/ext-all.css" />
        <script type="text/javascript" src="/ext/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="/ext/ext-all.js"></script>
        <script type="text/javascript">
             function myWindow()
             {
                 var tabPanel=new Ext.TabPanel(
                         {
                             width:300,
                             height:200,
                             items:[
                                    {
                                        contentEl:"tabOne",//标签页的页面元素id(加入你想显示的话)
                                        title:"HuyVanpull's Panel",
                                         activeTab:1, //当前激活标签
                                         height:30,
                                         closable:true
                                    },
                                    {
                                        contentEl:"tabTwo",//标签页的页面元素id(加入你想显示的话)
                                        title:"Hui Wanpeng's Panel",
                                         height:30,
                                         closable:true
                                    }

                                  ]
                         });
                //window组件,它继承自pane.
                var win=new Ext.Window(
                        {
                               contentEl:"container",
                               width:300,
                               height:200,
                               items:tabPanel,
                               plain:true,//true则主体背景透明,false则主体有小差别的背景色,默认为false
                               title:"My Window",
                               buttons:[{text:"OK"},{text:"CANCEL",handler:function(){win.close();}}],
                               buttonAlign:"center",
                               collapsible:true
                        });
                win.show();
             }
             Ext.onReady(myWindow);
        </script>
    </head>
    <body>
        <div id="container"></div>
        <div id="tabOne" class="x-hide-display">
            i am Huyvanpull!
        </div>
        <div id="tabTwo" class="x-hide-display">
            i am Hui Wanpeng!
        </div>
    </body>
</html>

posted on 2008-10-28 01:12 -274°C 阅读(2903) 评论(0)  编辑  收藏 所属分类: web前端

只有注册用户登录后才能发表评论。


网站导航:
 

常用链接

留言簿(21)

随笔分类(265)

随笔档案(242)

相册

JAVA网站

关注的Blog

搜索

  •  

积分与排名

  • 积分 - 872749
  • 排名 - 37

最新评论