jquery easyui自动补全
程序员文章站
2022-06-01 13:17:41
...
$("#A").combobox({
valueField: 'a',
textField: 'a',
panelWidth: 200,
onChange:function(values,o){
if(values != ""){
var url = '${s.base}/a/autocomplete/logisticserName.json?name='+values.trim()+'&time='+new Date().getTime();
$("#A").combobox("reload",url);
}
},
onSelect:function(record){
if(record != ""){
$("#b").val(record.b);
}
}
})
<td><span class="input_must">*</span>发货人姓名</td>
<td><input name="A" id="A" type="text" class="easyui-combobox"/></td>
<td><input name="b" id="b" type="text" class="easyui-combobox"/></td>