加红色字部分

jsp

<input class="easyui-combobox" id="keshi" name="keshi" value="${tPetitionReport.keshi}" />

js

整体关键代码示例如下:

  

$('#keshi').combobox({
url: '/ccewis/xffy/keshiList',
valueField: 'id',
textField: 'groupName',
multiple:true,
//width:tableWidth*0.17,
editable: true,
filter: function (q, row) {
var opts = $(this).combobox("options");
return row[opts.textField].indexOf(q) > -1;//将从头位置匹配改为任意匹配
},
onLoadSuccess: function () { //下拉框数据加载成功调用
var values = $(this).combobox('getValues').join(',');//获取选中的值的values
$(this).combobox('setValues',values.split(',')); //http://www.verydemo.com/demo_c110_i7529.html
    },
onSelect: function (rec) {
var keshiId = encodeURIComponent(rec.id);
//$('#visibleMan').combobox('clear');
$('#visibleMan').combobox('reload', '/ccewis/xffy/userList?keshiId=' + keshiId);
},
onChange: function (newValue, oldValue) {
if (newValue == "") {
$('#visibleMan').combobox('clear').combobox('reload', '/ccewis/xffy/userList');
}
}
});
05-02 17:23