0

で次のコードを使用していますが、私の webmethod ではプレーンな HTML を返しています。contentType はここにありますか?

 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.");
                        }
                    });
                }
4

1 に答える 1

0

ここ $("#divTimetable").html("").append(data.d);で使用しましたが、現在は正常に動作しています

于 2012-05-03T21:53:11.760 に答える