论坛首页 Web前端技术论坛

Ext Js 给window或panel加上热键

浏览 3413 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (3)
作者 正文
   发表时间:2008-08-21  
如题,代码如下:
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
		}]

	});
   发表时间:2008-08-22  
请问如何将Ext.EventObject.ENTER替换成Ext.EventObject.TAB呢?
0 请登录后投票
   发表时间:2008-08-22  
直接换不行吗!
0 请登录后投票
   发表时间:2008-08-26  
hanball,非常感谢你提供的代码!
0 请登录后投票
   发表时间:2008-10-05  
直接换就可以
0 请登录后投票
   发表时间:2008-10-23  
谢谢,梦里寻你千百度 蓦然回首 那人却在灯火阑珊处
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics