我正在尝试从 web 服务获取 tag-it 标签,问题是我什至可以成功,警报永远不会出现,也不会出现错误事件。
$('#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;
}
});
}
});