ExtJs ComboBox 动态创建下拉框

 
   

注:store中的url需要返回一个格式为[["1","a"]["2","b"]["3","c"]]的json格式的数据

var storeDept = new Ext.data.SimpleStore({
url:'<%=path %>/oneCardPassage/findCardDepartMentInfo.do',
fields:['value','text']
});


var deptCombo = new Ext.form.ComboBox({
id:'deptId',
width:100,
mode : 'remote',
triggerAction : 'all',
selectOnFocus : true,
forceSelection : true,
editable : false,
valueField : 'value',
displayField : 'text',
emptyText:'部门'},
store:storeDept
)


你可能感兴趣的:(extjs)