My Jquery function:
我的Jquery功能:
<script type="text/javascript">
function Origin(sender, args) {
$(function () {
$("#<%=txtInfo.ClientID %>").autocomplete({
source: function (request, response) {
$.ajax({
url: '<%=ResolveUrl("~/Webservice.asmx/Get") %>',
data: "{ 'prefix': '" + request.term + "'}",
dataType: "json",
type: "POST",
async: false,
mustMatch: true,
contentType: "application/json; charset=utf-8",
success: function (data) {
response($.map(data.d, function (item) {
return {
label: item.split('-')[0],
val: item.split('-')[1]
}
}))
},
error: function (response) {
},
failure: function (response) {
}
});
},
select: function (e, i) {
$("#<%=hdnInfo.ClientID %>").val(i.item.val);
info1()
},
minLength: 0
}).bind('focus', function () { $(this).autocomplete("search"); });
});
}
</script>
<script typ