0
我想調用一個.net webservice,它是由我的本地機器從jQuery .ajax()託管的。 該腳本包含在靜態.html文件中。 成功函數被觸發,但響應數據爲NULL。jQuery Ajax響應:成功獲取響應爲空
$.ajax({
type: "GET",
data: '{continent: "' + $('#txtContinent').val() + '"}',
url: "http://localhost:60931/Service1.asmx/GetCountries",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(response) {
alert(response);
},
failure: function(msg) {
$('#result').empty().append(msg);
}
});
當我提醒它給我空的響應, 誰能告訴我在哪裏IM提前布萊恩錯了,謝謝。
你已經安裝Firebug的,或者(如果你使用的是Chrome),你看在開發工具的控制檯調試Ajax調用? –