注: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 ComboBox 动态创建下拉框
最新推荐文章于 2021-12-27 13:48:02 发布
本文介绍如何使用ExtJS创建一个远程加载数据的组合框。通过SimpleStore加载指定URL返回的特定格式JSON数据,并设置ComboBox的相关属性实现部门选择功能。
2845

被折叠的 条评论
为什么被折叠?



