我的 json_encode 有这个回复
[{"name":"Client Serv","Handled":"1","Resolved":"1","Escalated":"0"},
{"name":"Chat","Handled":"1","Resolved":"0","Escalated":"0"}]
我希望将这些数据制成表格,但是,我认为我的代码有问题。附加的东西没有用。
request.done(function(msg) {
$("#my_progress tbody").html('');
msg = JSON.parse(msg);
for(i = 0; i < msg.length; i++){
$('#my_progress tbody').append('<tr><td>' + msg[i].name +'</td><td>' + msg[i].Handled + '</td><td>' + msg[i].Resolved + '</td><td>' + msg[i].Escalated + '</td></tr>');
}
});