0
我試圖從web服務獲取tag-it標籤,問題是我甚至可以進入成功,警報從不出現,也沒有錯誤事件。Tag-it jquery:從webserivce獲取標籤
$('#singleFieldTags').tagit({
//availableTags: sampleTags,
// This will make Tag-it submit a single form value, as a comma-delimited field.
singleField: true,
placeholderText: "Start typing your tags...",
singleFieldNode: $('#ContentPlaceHolder1_hidTags'),
availableTags: function() {
$.ajax({
url: "WServices/TypeService.asmx/getTags",
type: "POST",
data: JSON.stringify({ para_Parent_Name: "tags" }),
dataType: "json",
async: true,
success: function (data) {
console.log(data);
alert(data);
return data;
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("errer");
debugger;
}
});
}
});