Ext.onReady(function(){ 
Ext.QuickTips.init(); 
Ext.create("Ext.form.Panel",{ 
title:'本地hiddenfield实例', 
renderTo:'formDemo', 
bodyPadding:'5 5 5 5', 
height:100, 
width:270, 
frame:true, 
defaults:{ 
labelSeparator :": ", 
labelWidth : 70, 
width : 200, 
allowBlank: false, 
msgTarget : 'side', 
labelAlign:'left' 
}, 
items:[{ 
xtype:'textfield', 
name:'name', 
fieldLabel:'name', 
value:'USPCAT.COM' 
},{ 
xtype:'hiddenfield', 
name:'age', 
value:'1' 
}], 
buttons:[{ 
text:'提交', 
handler:function(){ 
this.up("form").getForm().submit({//this指当前组件(按钮),up是上一个组件中找(form) 
params:{ 
info:'age是隐藏字段' 
} 
}); 
} 
}] 
}); 
}) 
Extjs4中Form的使用之本地hiddenfield
内容版权声明:除非注明,否则皆为本站原创文章。
