您的位置:首页 > Web前端 > JavaScript

ExtJS回车提交

2009-09-10 10:15 239 查看
var myform = new Ext.form.FormPanel( {
bodyStyle : 'padding-top:6px',
defaultType : 'textfield',
labelAlign : 'right',
labelWidth : 55,
labelPad : 2,
//frame : true,
method:'POST',
//增加表单键盘事件
keys:[
{
key: [10,13],
fn:surely
} ],

defaults : {
allowBlank : false,
width : 158
},
items : [{
cls : 'user',
name : 'username',
fieldLabel : '帐 号',
blankText : '帐号不能为空'
}, {
cls : 'key',
name : 'password',
fieldLabel : '密 码',
blankText : '密码不能为空',
inputType : 'password'
}, {
cls : 'key',
name:'randCode',
id:'randCode',
fieldLabel:'验证码',
width:70,
blankText : '验证码不能为空'
}],
buttons:[
{
text:'确定',
id:'sure',
handler:surely
},
{
text:'重置',
id:'clear',
handler:reset
}]
});
return myform;
},
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: