<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> Ext.form.FieldSet</title>
<link rel="stylesheet" type="text/css"
href="script/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="css/buttons.css" />
<script type="text/javascript" src="script/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="script/ext-all.js"></script>
<script type="text/javascript" src="script/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript">
function init()
{
var form = new Ext.FormPanel({
title: 'Form',
labelWidth: 50,
url: 'test.jsp',
frame:true,
width: 480,
layout:'column',
defaults: {
layout: 'form',
bodyStyle: 'padding:4px',
columnWidth: 0.48,
width:60,
defaultType: 'textfield',
style : 'padding-left:15px;margin-left:10px;margin-top:10px;margin-bottom:10px',
items :[{
fieldLabel: 'Field 1'
}, {
fieldLabel: 'Field 2'
}, {
fieldLabel: 'Field 3'
}]
},
defaultType:"fieldset",
items: [{
title: 'FieldSet1',
collapsible: true
},{
title: 'FieldSet2'
}]
});
form.render("form");
}
Ext.onReady(init);
</script>
</head>
<body>
<br>
<br>
<center>
<div id="form"></div>
</center>
</body>
</html>