FormPanel fieldset应用
练习fieldset的使用
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>FormPanel fieldset应用</title><link href="ext/resources/css/ext-all.css" type="text/css"rel="stylesheet" /><script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script><script type="text/javascript" src="ext/ext-all.js"></script><script type="text/javascript" src="ext/ext-lang-zh_CN.js"></script><script type="text/javascript">Ext.onReady(function() {new Ext.FormPanel({renderTo : Ext.getBody(),bodyStyle : 'padding:5px 5px 0',frame : true,width : 330,items : [ {xtype : 'fieldset',title : '个人信息',collapsible : true,autoHeight : true,width : 300,defaults : {width : 150},defaultType : 'textfield',//容器的默认类型items : [ {fieldLabel : '爱好',name : 'hobby',value : 'www.cnblogs.com'//字段初始化的值(默认为undefined)}, {xtype : 'combo',name : 'sex',store : [ "男", "女", "保密" ],//该组合框绑定的数据仓库(默认为undefined)fieldLabel : '性别',emptyText : '请选择性别。'//空字段中显示的文本(默认为null)} ]} ]});});</script></head><body></body></html>?
效果图

?
?