日期:2014-05-16 浏览次数:20481 次
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" /> <script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="extjs/ext-all.js"></script> <script> Ext.onReady(function(){ var formpanel=new Ext.FormPanel({ labelAlign: 'center', renderTo: document.body, layout:'form', frame:true, title: '知识库管理(无线宽带导航页面推送)', bodyStyle:'padding:5px 5px 0', anchor:'95%', items:[{ id:'rd', xtype: 'radiogroup', name: 'biztype', width: 220, columns: 3, fieldLabel: '业务类别', items:[ {boxLabel: 'type1',name:'type1', inputValue: '01'}, {boxLabel: 'type2',name:'type2', inputValue: '02'}, {boxLabel: 'type3',name:'type3', inputValue: '03'} ] }] }); function getData(){ var conn = new Ext.data.Connection(); conn.request({ url:'./combobox.jsp', success: function(response){ itemArray = Ext.util.JSON.decode(response.responseText); var cfg = Ext.getCmp('rd').initialConfig; cfg.items = itemArray; formpanel.remove(Ext.getCmp('rd')); var newrg = new Ext.form.RadioGroup(cfg); formpanel.add(newrg); formpanel.doLayout(); } }); } getData() }); </script>