【发布时间】:2025-12-12 02:45:02
【问题描述】:
jQuery.ajax({
type: "GET",
url: 'http://example.com/restaurant/VeryLogin(username,password)',
dataType: "json",
success: function (data) {
alert(data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("error");
}
});
它提示成功,但数据为空。 url返回xml数据,如果我们指定dataType我们可以得到json数据,但是这里没有得到任何数据。
任何帮助表示赞赏。
【问题讨论】:
标签: asp.net ajax wcf-web-api