//下拉框渲染
$("#diseaseCode").combobox({
url: "<%=basePath%>sys/disease/queryAll.action",
valueField: 'diseaseCode',
textField: 'diseaseName',
editable:true,
multiple : false,
onHidePanel:function(none){
var data = $(this).combobox('getData');
var val = $(this).combobox('getValue');
var result = true;
for (var i = 0; i < data.length; i++) {
if (val == data[i].diseaseCode) {
result = false;
}
}
if (result) {
$(this).combobox("clear");
}else{
$(this).combobox('unselect',val);
$(this).combobox('select',val);
}
},
filter: function(q, row){
var keys = new Array();
keys[keys.length] = 'diseaseName';
return filterLocalCombobox(q, row, keys);
}
});
easyUI可搜索下拉框
最新推荐文章于 2024-04-08 17:39:55 发布