<input style="width: 250px" id="addf_setformula" name="ADDF" class="easyui-combobox" data-options="required:false,editable:false">
$('#addf_setformula').combobox({
onChange: function(newValue, oldValue){
if(newValue!=oldValue)
{
$.getJSON("../"+modulepath+"/getcode.php", {PARA: newValue,TYPE:"3"}, function(data){
//alert(data);
if(isedita ==true)
{
isedita = false;
}
else
{
$('#addt_setformula').combobox('setValue', '');
}
$('#addt_setformula').combobox('loadData', data.all);
});
}
}
});
这个下拉框目前的功能是给出了一串select,现在想要加上像text一样的输入功能,如果用户输入字符,则从数据库筛选相类似的选项替换之前的select。一个combobox可以同时满足上面的两个需求么