Extjs学习之button
来源:互联网 发布:淘宝网店成功案例数据 编辑:程序博客网 时间:2024/06/02 09:40
button可以通过handler来运行相关代码当用户单击button后,或者使用listeners来处理其他事件,例如鼠标移动
例一:
Ext.create('Ext.Button', { text: 'Click me', renderTo: Ext.getBody(), handler: function() { alert('You clicked the button!'); }});
Ext.create('Ext.Container',{ renderTo:Ext.getBody(), items:[ { xtype:'button', text:'My', scale:'large' } ] });scale属性指定button的外观大小,有'small''medium''large'三种属性button也可以当做是菜单来用Ext.create('Ext.Container',{ renderTo:Ext.getBody(), items:[ { xtype:'button', text:'My', scale:'large', menu:[ {text:'1'}, {text:'2'}, {text:'3'} ] } ] });listeners: { click:function() { this.setText('click'); }, mouseover:function() { alert('hello'); } }
listeners有多个事件:
- click
- toggle
- mouseover
- mouseout
- mouseshow
- menuhide
- menutriggerover
- menutriggerout
- Extjs学习之button
- 学习ExtJS(二) Button常用方法
- 学习ExtJS(二) Button常用方法
- Android学习之button
- dojo学习之button
- ExtJS学习之tree
- ExtJS学习之ComboBox
- ExtJS学习之EditorGridPanel
- ExtJS学习之Record
- 学习 extjs之路
- ExtJS学习之TreePanel
- ExtJS学习之EditorGridPanel
- Extjs 学习之记录
- extJS学习之helloworld
- ExtJS学习之HelloWorld
- ExtJS学习之formPanel
- Extjs学习之窗体
- ExtJS学习之MessageBox
- 【转】UML类关联关系详解
- linux 等待队列 第三篇
- linux 用户空间与内核空间——高端内存详解
- 【原】geohash算法详解
- JS调用Webservice
- Extjs学习之button
- 【转】UML用例图
- sql笔记整理之多表链接查询
- 【原】java定时器简单了解
- 【原】java线程温故
- 【原】CountDownLatch使用
- 【原】高效程序员的45个习惯-读书笔记
- 【原】空间索引技术分析
- linux中fork同时创建多个子进程的方法