Ext中窗体第二次点击报错或者其内控件不显示的问题,弄了2天才解决,记录下

registerPanel.js:

1 registerPanel = new Ext.form.FormPanel({ 2id:’registerPanel’, 3layout:’form’, 4autoHeight:true, 5autoWidth :true, 6fileUpload:true, 7enctype:’multipart/form-data’, 8 items:[{ 9xtype:’textfield’, 10fieldLabel:’ 会员名’, 11allowBlank:false, 12blankText:’请输入会员名’,name:’name’, 15id:’name’, 16anchor:’90%’ 17 },{ 18xtype:’textfield’, 19inputType:’password’,anchor:’90%’ ,allowBlank:false, 23blankText:’请输入密码’, 24name:’password’, 25id:’password’, 26fieldLabel:’ 密码’ 27 },{ 28xtype:’textfield’, 29inputType:’password’,anchor:’90%’,allowBlank:false, 33blankText:’请确认密码’, 34name:’confirmPassword’, 35id:’confirmPassword’, 36fieldLabel:’ 确认密码’, 37invalidText:’两次密码不一致’, 38 validator:function(){ (Ext.get(‘password’).dom.value == Ext.get(‘confirmPassword’).dom.value){ ; 42}else{ ; 44 } 45 } 46 },{ 47fieldLabel:’ 性别’, 48xtype:”panel”, 49frame:true,//背景色透明加了以后就没有白色框框了layout:”column”,anchor:’90%’, 53 items:[{xtype:’radio’,boxLabel:’男’, 58name:’sex’,inputValue:’男’//控件的值},{ 63columnWidth:.40, 64xtype:’radio’, 第二个raido控件的列设置就有所不同,香港服务器,因为它不需要标题,香港空间,虚拟主机,所以要设置隐藏标题boxLabel:’女’, 68name:’sex’, 69inputValue:’女’}] 72 },{ 73xtype:’textfield’, 74fieldLabel:’ QQ’, 75name:’QQ’, 76id:’QQ’, 77anchor:’90%’ 78 },{ 79xtype:’textfield’, 80fieldLabel:’ 电话’, 81name:’phone’, 82id:’phone’, 83anchor:’90%’, 84allowBlank:false, 85blankText:’电话不能为空’,regexText : ‘移动电话号码格式输入错误!’ 88 },{ 89xtype:’textfield’, 90fieldLabel:’ 邮箱’, 91name:’email’, 92id:’email’, 93anchor:’90%’, 94regex : /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/,},{ 97xtype:’textfield’, 98fieldLabel:’ 宿舍号’, 99name:’address’,100id:’address’,101anchor:’90%’102 },{103xtype:’textfield’,104name:’membphoto’,105inputType:’file’,106fieldLabel:’ 上传头像’,107labelAlign:’right’,108anchor:’90%’}],111buttonAlign: ‘center’,112 buttons:[{113text:’提交’,114 handler:function(){115Ext.MessageBox.alert(“提交”);116 }117 },{118text:’取消’,119 handler:function(){120Ext.getCmp(“registerWindow”).hide();121 }122123 }]124 })含泪播种的人一定能含笑收获。

Ext中窗体第二次点击报错或者其内控件不显示的问题,弄了2天才解决,记录下

相关文章:

你感兴趣的文章:

标签云: