extjs中验证实例

时间:2015-12-18 07:50:19
【文件属性】:

文件名称:extjs中验证实例

文件大小:1KB

文件格式:JSP

更新时间:2015-12-18 07:50:19

learnFjs

function testFormValidate(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget="under"; var fset = new Ext.FormPanel({ title:"学习表单字段元素的字段集", width:600, height:400, frame:true, renderTo:"myForm", items:[ {xtype:"fieldset", width:500, labelAlign:"right", labelWidth:70, title:"个人信息" , collapsible:true, autoHeight:true, defaultType:"textfield", items:[ {fieldLabel:"姓名", //width:250, //设置了anchor后无效 allowBlank:false, blankText:"姓名不能为空", anchor:"50%" }, { fieldLabel:"密码", name:"pass", inputType:"password", anchor:"50%" }, { fieldLabel:"家庭住址", width:250, value:"四川射洪" } ] }, { xtype:"fieldset", width:500, title:"选填信息", checkboxToggle:true, checkboxName:"xtxx", autoHeight:true, items:[ {xtype:"textfield", fieldLabel:"工作单位" , width:250 }, { xtype:"combo", width:250, fieldLabel:"性别", store:["男","女","保密"], emptyText:"请选择性别" } ] } ] });


网友评论