读书人

easyui combobox输入长度有关问题

发布时间: 2013-01-21 10:15:38 作者: rapoo

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='';
}}


读书人网 >JavaScript

热点推荐