我有一个 jquery 函数,它对 Web 服务器上的 Web 服务方法进行 ajax 调用,该方法返回一个包含数据的 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 之外的所有浏览器。
对此的任何帮助将不胜感激。
最佳答案
关于jquery .html() 不适用于 ie8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3105949/