var fp = new Ext.FormPanel({
id:'images-view',
frame: true,
title:'添加设备',
labelWidth: 110,
width: 850,
renderTo:'form-ct',
bodyStyle: 'padding:0 10px 0;',
itemSelector:'div.thumb-wrap',
items: [{
xtype:'fieldset',
title: '添加设备',
autoHeight: true,
items: [
{
xtype: 'textfield',
fieldLabel: '司机姓名',
name: 'drivername',
width:190
},
{
xtype: 'textfield',
fieldLabel: '司机手机',
name: 'driverphone',
width:190
},
{
xtype: 'textfield',
fieldLabel: '驾驶证号',
name: 'dirvercard',
width:190
},
{
xtype: 'textarea',
fieldLabel:'备注',
name: 're',
width:190
},
{
xtype: 'radiogroup',//单选按钮
fieldLabel: '选择图标',
items: [
{boxLabel: 'Item 1', name: 'rb-auto', inputValue: 1},
{boxLabel: 'Item 2', name: 'rb-auto', inputValue: 2, checked: true},
{boxLabel: 'Item 3', name: 'rb-auto', inputValue: 3},
{boxLabel: 'Item 4', name: 'rb-auto', inputValue: 4},
{boxLabel: 'Item 5', name: 'rb-auto', inputValue: 5}
]
}]
}],
buttons: [{
text: '提交',
handler: function(){
if(fp.getForm().isValid()){
Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />'+
fp.getForm().getValues(true).replace(/&/g,', '));
}
}
},{
text: '重置',
handler: function(){
fp.getForm().reset();
}
}]
});
}); 求叫各位哥们,这两天在思考一个问题,我开发一个项目,现在遇到一个问题,我们项目的客户端用Ext js 2.0做的,我现在这代码就是一个提交页面,我想用 单选按钮 把数据库里的图标显示在FormPanel面板上:意思就是当我点击按钮添加图标入库(xtype: 'radiogroup'),在这FormPanel面板上我不知道怎么做了 ,第一次用这框架做客服端,现在急死人了 ,跟们帮小弟我一把吧!小弟谢谢了!
id:'images-view',
frame: true,
title:'添加设备',
labelWidth: 110,
width: 850,
renderTo:'form-ct',
bodyStyle: 'padding:0 10px 0;',
itemSelector:'div.thumb-wrap',
items: [{
xtype:'fieldset',
title: '添加设备',
autoHeight: true,
items: [
{
xtype: 'textfield',
fieldLabel: '司机姓名',
name: 'drivername',
width:190
},
{
xtype: 'textfield',
fieldLabel: '司机手机',
name: 'driverphone',
width:190
},
{
xtype: 'textfield',
fieldLabel: '驾驶证号',
name: 'dirvercard',
width:190
},
{
xtype: 'textarea',
fieldLabel:'备注',
name: 're',
width:190
},
{
xtype: 'radiogroup',//单选按钮
fieldLabel: '选择图标',
items: [
{boxLabel: 'Item 1', name: 'rb-auto', inputValue: 1},
{boxLabel: 'Item 2', name: 'rb-auto', inputValue: 2, checked: true},
{boxLabel: 'Item 3', name: 'rb-auto', inputValue: 3},
{boxLabel: 'Item 4', name: 'rb-auto', inputValue: 4},
{boxLabel: 'Item 5', name: 'rb-auto', inputValue: 5}
]
}]
}],
buttons: [{
text: '提交',
handler: function(){
if(fp.getForm().isValid()){
Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />'+
fp.getForm().getValues(true).replace(/&/g,', '));
}
}
},{
text: '重置',
handler: function(){
fp.getForm().reset();
}
}]
});
}); 求叫各位哥们,这两天在思考一个问题,我开发一个项目,现在遇到一个问题,我们项目的客户端用Ext js 2.0做的,我现在这代码就是一个提交页面,我想用 单选按钮 把数据库里的图标显示在FormPanel面板上:意思就是当我点击按钮添加图标入库(xtype: 'radiogroup'),在这FormPanel面板上我不知道怎么做了 ,第一次用这框架做客服端,现在急死人了 ,跟们帮小弟我一把吧!小弟谢谢了!
2、htmlEl
3、contentEl
好像是这些吧,楼主自己查文档哦