我有一个jQuery函数,它通过AJAX调用Web服务器上的Web服务方法,该方法返回一个带有数据的HTML表格。 我正在使用.html()将返回值呈现在div上。 这在Firefox,Chrome,Safari中有效,但在IE8中不起作用。
$.ajax({
type: "POST",
url: "./../WebAjaxCalls.asmx/GetProductInstruction",
data: "{'ProductID':'" + $("#txtProductID").val() + "'}",
success: function(data) {
if (data.d[0] == "true") {
**$("#dvProudctInstruction").html(data.d[1]);**
}
},
contentType: "application/json; charset=utf-8",
dataType: "json",
error: function(e, textStatus, errorThrown) {
bReturn = false;
}
});
这一行 $("#dvProudctInstruction").html(data.d[1]); 在除IE8之外的所有浏览器中均有效。
非常感谢任何帮助。