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();

 

你可能感兴趣的:(ExtJs)