【发布时间】:2009-07-17 12:40:55
【问题描述】:
我正在尝试从 asp.net Web 服务返回一个 html 表,但无法弄清楚如何获取返回为实际 html 的字符串。这是我的 jquery 调用...
$.ajax({
type: "POST",
url: "UserService.asmx/PersonTable",
data: "{}",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function(obj) {
alert(obj);
$('#tblPeople').text(obj.d);
},
error: function() {
alert("error");
}
})
它以我想要的格式返回字符串,但只是将字符串写到屏幕上,这是 html 表的字符串表示形式。如何获取要呈现的实际 Html 表?
【问题讨论】: