ExtJs菜单工具栏综合实例
来源:互联网 发布:淘宝女人针织衫 编辑:程序博客网 时间:2024/06/05 16:41
<!DOCTYPE html><html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <meta charset="utf-8" /> <link href="Ext4.2/resources/css/ext-all.css" rel="stylesheet" /> <script src="Ext4.2/bootstrap.js"></script> <script> Ext.onReady(function () { var toolbar = new Ext.toolbar.Toolbar({ renderTo: 'toolbar', width: 300 }); var filemenu = new Ext.menu.Menu({ shadow: 'frame', allowOtherMenus: true, items: [ new Ext.menu.Item({ text: '新建', handler: onMenuItem }), { text: '打开', handler: onMenuItem }, { text: '关闭', handler: onMenuItem }, { text: '颜色选择', menu: new Ext.menu.ColorPicker() }, { xtype: 'datepicker' }, { xtype: 'buttongroup', columns: 3, title: '按钮组', items: [ { text: '用户管理', scale: 'large', colspan: 3, width: 170 }, { text: '撤销' }, { text: '重做' }, { text: '返回' } ] } ] }); var infomenu = new Ext.menu.Menu({ ignoreParentClicks: true,//忽略父级菜单的菜单点击事件 plain: true, items: [ { text: '个人信息', menu: new Ext.menu.Menu({ ignoreParentClicks: true,//忽略父级菜单的菜单点击事件 items: [{ text: "基本信息", menu: new Ext.menu.Menu({ items: [{ text: "身高" }, { text: "体重" }] }) }] }) }, { text: "公司信息" } ] }) var editmenu = new Ext.menu.Menu({ shadow: 'drop', allowOtherMenus: true, items: [ { text: "复制" }, { text: "粘贴" }, { text: "剪切" } ] }); var thememenu = new Ext.menu.Menu({ items: [{ text: '颜色主题', menu: new Ext.menu.Menu({ items: [{ text: '红色主题', checked: true, group: 'theme', checkHandler: onMenuItem }, { text: '蓝色主题', checked: false, group: 'theme', checkHandler: onMenuItem }, { text: '黑色主题', checked: false, group: 'theme', checkHandler: onMenuItem } ] }) }, { text: '是否启用', checked:false }] }) toolbar.add( { text: "文件", menu: filemenu }, { text: "编辑", menu: editmenu }, { text: "设置", menu: infomenu }, { text: "选择", menu: thememenu } ); function onMenuItem(btn) { alert(btn.id + ":" + btn.text); } }); </script></head><body> <div id="toolbar"></div></body></html>
0 0
- ExtJs菜单工具栏综合实例
- ExtJs工具栏设置实例
- ExtJs EditGridPanle 综合实例
- EXTJS 菜单的综合例子
- ExtJS的使用方法汇总(6)——工具栏和菜单
- ExtJS的使用方法汇总(6)——工具栏和菜单
- ExtJS的使用方法汇总6——工具栏和菜单
- ExtJS的使用方法汇总(6)——工具栏和菜单
- ExtJS学习笔记四:综合实例登陆框
- Extjs中的工具栏介绍
- Extjs菜单
- ExtJS--菜单
- 工具栏&菜单项
- Ext工具栏菜单_wayfoon
- RCP--菜单,工具栏
- vc的菜单,工具栏
- 菜单,工具栏,状态栏
- 菜单、工具栏、状态栏
- 【GoLang】panic defer recover 深入理解
- Java 中 int 转 char
- 招聘简章
- python操作excel
- 文章标题
- ExtJs菜单工具栏综合实例
- leetcode--Implement Queue using Stacks
- 还是几道简答题
- avc三期项目 --令牌桶算法
- android Fragment作为tab时的延迟加载
- 单循环链表
- Python学习day4作业
- Hibernate中的核心借口Query
- linux学习-装机分区