如题,代码如下:
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
}]
});