我正在使用以下代码,但在我的web方法中,我将返回纯HTML。内容类型是否就在这里?
function PopulateTimetable(pGroupId) {
$.ajax({
type: "POST",
cache: false,
url: "StudentTimetable.aspx/PopulateTimetable",
data: "{ 'pGroupId': '"+51+"'}",
contentType: "application/json; charset=utf-8",
dataType: "html",
timeout: 10000,
success: function(data) {
$("#divTimetable").removeClass("Progress");
$("#divTimetable").html("").append(data);
},
error: function() {
$("#divTimetable").removeClass("Progress");
alert("An unexpected error has occurred during processing.");
}
});
}
答案 0 :(得分:0)
我在这里$("#divTimetable").html("").append(data.d);
使用它现在工作正常