日期:2014-05-18 浏览次数:20701 次
$.each(data.users, function(k, val) {
addUser(val);
});
function addUser(obj) {
var tr = document.createElement("tr");
var td1 = document.createElement("td");
td1.innerHTML = "User No: " + obj.userNo;
var td2 = document.createElement("td");
td2.innerHTML = "User Name: " + obj.userName;
tr.appendChild(td1);
tr.appendChild(td2);
$(tr).appendTo("#userTable");
};