ExtJs2.0裡Ext.form.Radio水平排列布局

來源:互聯網
上載者:User

標籤:new   url   win   更新   hand   title   window   相同   input   

  ExtJs2.0好像不支援單選框組,因此用兩個name相同單選框來實現單選框組 var radio1 = new Ext.form.Radio({boxLabel:‘男‘,name:‘sex‘,id:‘yes‘,inputValue:‘0‘,width : 150, height : 20}); var radio2 = new Ext.form.Radio({boxLabel:‘女‘,name:‘sex‘,id:‘no‘,inputValue:‘1‘, width : 150,height : 20}); //性別配置FieldSet var fieldSet = new Ext.form.FieldSet({     title : ‘性別配置‘,     autoHeight : true,     width : 350,     labelAlign : ‘right‘,     labelwidth : 110,     bodyStyle : ‘padding:5px 5px 0‘,     layout:‘column‘,     items : [{           columnWidth : .5,           items:radio1  //radio1一定要寫在單獨的items裡面,不然在頁面顯示的效果就是兩個單選框的圓圈在前面,兩個單選框選項的描述在後面     },     {           columnWidth : .5,           items: radio2     }]}); var fp = new Ext.FormPanel({     id : ‘sex_mode‘,     labelWidth : 110,     waitMsg : ‘正在提交,請稍後...‘,     frame : true,     width : 380,     autoHeight : true,     layout:‘column‘,     items : [fieldSet]}); var winKey = new Ext.Window({     id : "sex_win",     title : ‘[性別]維護‘,     autoHeight : true,// 320,     width : 400,     closeAction : ‘hide‘,     closable: false,     iconCls : ‘add‘,     modal : true,     buttons : [{           text : ‘提交‘,           id : ‘button‘,           handler : function() {                 var sex = fp.form.findField("sex").getGroupValue();                 if(sex != ‘‘ && sex != undefined && sex != null){                     fp.form.submit({                           url : ‘‘,  //配置性別的方法                           waitTitle : "[性別]修改",                           waitMsg : ‘正在提交資料,請稍後... ...‘,                           success : function(form, action) {                                     Ext.MessageBox.alert(‘提示資訊‘,action.result.msg);                           },                           failure : function(form, action) {                                Ext.MessageBox.alert(‘提示資訊‘, "更新性別有誤!");                           }                     });                } else{                     Hs.util.Msg(‘提示資訊‘, ‘請選擇性別!‘);                }                     }     }],     items : [fp]});

ExtJs2.0裡Ext.form.Radio水平排列布局

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.