我在ASP.Net MVC
中使用以下代码收到上述错误<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/start/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#CountryName").autocomplete({
source: function (request, response) {
$.ajax({
url: "/Home/GetCountries",
type: "POST",
dataType: "json",
data: { Prefix: request.term },
success: function (data) {
response($.map(data, function (item) {
return { label: item.Name, value: item.Name };
}))
}
})
},
messages: {
noResults: "",
results: function (count) {
return count + (count > 1 ? ' results' : ' result ') + ' found';
}
}
});
})
</script>
我关注了this question,但它无效,显示错误。