ASP.NET+ExtJs4.0+Menu菜單工具條的使用

來源:互聯網
上載者:User
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>    <title></title>    <!--ExtJs4.0官方下載以下樣式檔案-->    <link href="extjs/resources/css/ext-all.css" rel="stylesheet" type="text/css" />    <!--ExtJs4.0官方下載以下ExtJs檔案-->    <script src="extjs/ext-all.js" type="text/javascript"></script>    <!--ExtJs4.0官方下載以下ExtJs顯示中文檔案-->    <script src="extjs/ext-lang-zh_CN.js" type="text/javascript"></script>    <script language="javascript" type="text/javascript">        Ext.onReady(function () {            var menu = new Ext.menu.Menu({                items: [                    { text: "我是銨鈕一" },                    { text: "我是銨鈕二", icon: "icons/add16.gif", handler: function (b) { alert("你點我了"); } },                    { xtype: "menuseparator" },                    { text: "你要不要最大化", xtype: "menucheckitem",                        listeners: {                            checkchange: function (m, checked) {                                if (checked) {                                    Ext.MessageBox.alert("提示", "你選中了我");                                }                                else {                                    Ext.MessageBox.alert("提示", "你沒選中我");                                }                            }                        }                    }                ]            });            var win = new Ext.window.Window({                width: 500,                height: 600,                title: "工具條樣本",                tbar: [                    { text: "銨鈕" },                    { xtype: "tbseparator" },                    { xtype: "splitbutton", text: "開啟", menu: menu },                    { xtype: "tbspacer", width: 30 },                    { xtype: "textfield" },                    {xtype:"tbfill"},                    {xtype:"label",text:"我要到最後"}                ]            });            win.show();        });    </script></head><body></body></html>

效果預覽如下:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.