如果自動完成適用於錯誤/失敗情況,您可以幫我解決如何刪除微調器/加載圖像嗎?刪除微調器/加載圖像中的自動完成錯誤
如果我得到錯誤「由於意外的錯誤,我們無法加載數據」我看到加載的圖像,我想刪除該圖像。
下面是摘錄
$("Autotxt").autocomplete({
source: function (request, response) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "Webservice.asmx/GetNames",
data: "{'prefixText':'" + request.term + "'}",
dataType: "json",
success: function (data) {
response($.map(data.d, function (item) {
return {
label: item.split('|')[0],
val: item.split('|')[1]
}
}))
},
error: function (result) {
alert("Due to unexpected errors we were unable to load data");
ServiceFailed(result);
},
failure: function (response) {
alert("Due to unexpected errors we were unable to load data");
}
});
},
select: function (event, ui) {
txtSoID(ui.item.val);
},
minLength: 4
});
function txtID(val)
{
alert(val)
}
你是什麼形象的HTML? – 2012-02-13 13:56:37