我已经为Bootstrap输入实现了一个jQuery自动完成功能.jQuery自动完成工作正常,但我希望将结果看作组合,我猜它现在正在发生,因为我正在使用BootStrap.
这是我正在分配自动完成的字段:
<div class="form-group">
<label>Employee</label>
<input class="form-control" name="txtEmployee" placeholder="Trabajador">
</div>
Run Code Online (Sandbox Code Playgroud)
$(this).autocomplete({
source: function(request, response) {
$.ajax({
url: '@Url.Content("~/Employee/SearchEmployee")/',
type: 'POST',
contentType: 'application/json',
dataType: "json",
data: JSON.stringify({
employerId: 1,
searchStr: me.val()
}),
success: function(data) {
if (data.success) {
response($.map(data.data, function(item) {
return {
label: "(" + item.EmployeeNumber + ") " +
item.FirstName + " " +
item.MothersLast + ", " +
item.FathersLast,
employeeId: item.EmployeeId
}
}));
}
}
});
},
minLength: 3
});
Run Code Online (Sandbox Code Playgroud)
结果显示但是像这样:

如何使用Bootstrap设置结果样式,以便我可以看到它们如dropdownlist?