ExtJs动态生成复选框

var old_value = Ext.get("fgzr_select").getValue() 
if(old_value == ""){
    document.getElementById("fgzr_select").value = value;
}else{
    document.getElementById("fgzr_select").value = old_value + ";" + value;
}
var _checkbox=new  Ext.form.Checkbox({   
            id:"fgzr_"+value,               
    name:"fgzr_check",
    //labelSepartor: ":",
    labelSeparator:'',
    style:"display:none;",
    boxLabel : value,                  
    inputValue : value
});
/*if(result[i].tjzdbm=='OD_RANGE'){//OD范围必选
    _checkbox.checked=true;
}*/
Ext.getCmp('fgzr_select_field').add(_checkbox);
Ext.getCmp('fgzr_select_field').doLayout();

 

posted @ 2013-09-13 18:05  残星  阅读(6091)  评论(0编辑  收藏  举报