本文介绍了专注于JQuery中的AutoComplete不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请任何机构可以查看下面的代码,这是行不通的
Please Any Body can check below code, this is not working
<script type="text/javascript" language="javascript">
$(function () {
$('#<%=txtKeyWord.ClientID %>').autocomplete({
source: function (request, response) {
$.ajax({
url: "WebService.asmx/spGetKeyword",
data: "{ 'keyword': '" + request.term + "' }",
type: "POST",
dataType: "json",
contentType: "application/json;charset=utf-8",
success: function (result) {
response(result.d);
},
error: function (result) {
alert('There is a problem processing your request');
}
});
},
minLength: 0,
focus: function () {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
data: "{ Iid: '" + $('#<%=txtItemCode.ClientID %>').val() + "'}",
url: "WebService.asmx/GetNameFromService",
dataType: "json",
success: function (data) {
$('#<%=txtKeyWord.ClientID %>').val(data.d);
}
});
}
});
});
</script>
帮帮我如果有人知道
谢谢
Bajid
推荐答案
这篇关于专注于JQuery中的AutoComplete不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!