1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| Ext.onReady(function(){ var formLogin = new Ext.FormPanel({ frame: false, border: false, buttonAlign: 'center', url: BASE_URL 'user/extjs_login', method: 'POST', id: 'frmLogin', items: [{ xtype: 'textfield', fieldLabel: 'Username', id:'fldusername', name: 'username', allowBlank: false }, { xtype: 'textfield', fieldLabel: 'Password', id:'fldpassword', name: 'password', allowBlank: false, inputType: 'password' }], buttons: [ { text: 'Login' }, { text: 'Reset', handler: function() { formLogin.getForm().reset(); } } ], keys: [ { key: [Ext.EventObject.ENTER]</font>, handler: function() { Ext.Msg.alert("Alert","Enter Key Event !"); } } ] </span> });
var winLogin = new Ext.Window({ title: 'Extjs Enter Key Event', layout: 'fit', width: 340, height: 140, resizable: false, closable: false, items: [formLogin] });
winLogin.show(); });
|