$.getJSON("/GetData.ashx",{ action: "display" },function(data) {
var html = "<table><tr><td>UserId</td><td>UserName</td></tr>";
$.each(data, function(i, result) {
html += "<tr><td>" + result["UserId"] + "</td><td>" + result["UserName"] + "</td></tr>";
})
html += "</table>";
$("#divData").html(html);
})
复制代码 代码如下:
$.getJSON("/GetData.ashx",{ action: "display" },function(data) {
var html = "<table><tr><td>UserId</td><td>UserName</td></tr>";
$.each(data, function(i, result) {
html += "<tr><td>" + result["UserId"] + "</td><td>" + result["UserName"] + "</td></tr>";
})
html += "</table>";
$("#divData").html(html);
})
您可能感兴趣的文章: