<script type="text/javascript">
Ext.onReady(function(){
Ext.QuickTips.init();
var storeList = new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
emptyText:'',
mode: 'local',
selectOnFocus:true,
transform:'ta_code', // 将已存在select(通过id)直接转ComboBox
width:135
});
storeList.on('beforequery',function(e){
var combo = e.combo;
if(!e.forceAll){
var value = e.query;
combo.store.filterBy(function(record,id){
var text = record.get(combo.displayField);
//用自己的过滤规则,如写正则式
return (text.indexOf(value)!=-1);
});
combo.expand();
return false;
}
});
})
</script>
07-14
07-14
07-14
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交