`

Ext Js 给window或panel加上热键

阅读更多
如题,代码如下:
var OverTimeForm = new Ext.form.FormPanel({
		bodyStyle: 'padding: 15px 0 0 10px;',
		defaultType: 'textfield',
		items:[{
			fieldLabel: '超时时间(小时/h)',
			name: 'overTime',
			xtype: 'numberfield'
		},{
			xtype: 'panel',
			border: false,
			html: '<div style="color:red">设置终端刷卡后的有效时间!</div>'
		}],
		buttons:[{
			text: '确定',
			scope: this,
			handler: this.setOverTime
		},{
			text: '取消',
			scope: this,
			handler: this.cancleOverTime
		}],
//热键添加
		keys:[{
			key : Ext.EventObject.ENTER,
			fn : this.setOverTime,
			scope : this
		}]

	});
分享到:
评论
5 楼 cola.cao 2008-10-23  
谢谢,梦里寻你千百度 蓦然回首 那人却在灯火阑珊处
4 楼 zhw511006 2008-10-05  
直接换就可以
3 楼 fangzhouxing 2008-08-26  
hanball,非常感谢你提供的代码!
2 楼 chanball 2008-08-22  
直接换不行吗!
1 楼 fsdos 2008-08-22  
请问如何将Ext.EventObject.ENTER替换成Ext.EventObject.TAB呢?

相关推荐

Global site tag (gtag.js) - Google Analytics