日期:2014-05-16  浏览次数:20318 次

easyui combobox输入长度问题
本帖最后由 liuliu26 于 2013-01-10 17:28:39 编辑
			$('#cc').combobox({
required : true,
url : 'aa.json',
textField : 'text',
valueField : 'id',
mode : 'remote',
method:'post',
panelHeight : 'auto',
width:150,
delay : 500,
value : ''
}


如何实现输入2个以上字符才去读取aa.json

------解决方案--------------------
$('#cc').combobox({                 
required : true,                 
url : 'aa.json',                 
textField : 'text',                 
valueField : 'id',                 
mode : 'remote',                 
method:'post',                 
panelHeight : 'auto',                 
width:150,                 
delay : 500,                 
value : '',
onChange:function(newValue,oldValue){
var options=$(this).combobox("options");
if(newValue.length>2)
options.url='aa.json';
else
options.url='';
}}