$(document).ready(function () {
$("#deceasedmonths").change(function () {
$.ajax({
type: "POST",
url: '<%=Url.Action("ArchiveList", "Deceased","POST")%>',
dataType: 'json',
data: { month: $("#deceasedmonths :selected").val() },
success: function (response) {
var markup = "<div><tr><th>First Name</th><th>Last Name</th><th>Gender</th><th>Date of Death</th></tr></div>";
for (var x = 0; x < response.length; x++) {
var val = response[x].split(",");
markup += "<tr><td>" + val[0] + "</td><td>" + val[1] + "</td><td>" + val[2] + "</td><td>" + val[3] + "</td></tr>";
};
$("#archivelistdeceasedgridview").html(markup).show();
}
})
});
});
我有上面的代码从 MVC 2 控制器返回一个 Json。该代码在 Firefox 中有效,但在 Internet Explorer 中无效。有人可以帮忙...
谢谢