Combobox三角下拉箭头的监听为 'focus' ,在点击下拉箭头时判断是否为空
先加载store
store.load();将Combobox的加载模式设置为本地加载
combobox = new Ext.form.ComboBox( { store : store, mode : "local",//本地加载 }监听
focus用getCount()函数获取判断store是否为空listeners : { "focus" : function(){ if(store.getCount == 0) alert("Combobox值为空"); } }
本文介绍如何使用ExtJS框架配置ComboBox组件实现本地加载数据,并通过监听focus事件检查store是否为空。当store为空时,会弹出提示。文章还提供了具体的代码实现。
1万+

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



