var emps = result.extend.pageInfo.list;
$.each(emps, function (index, item) {
var checkBoxTd = $("<td><input type='checkbox' class='check_item'></input></td>");
var empIdTd = $("<td></td>").append(item.empId);
var empNameTd = $("<td></td>").append(item.empName);
var genderTd = $("<td></td>").append(item.gender);
var emailTd = $("<td></td>").append(item.email);
var deptNameTd = $("<td></td>").append(item.department.deptName);
var json1={key1:'a',key2:'b',key3:'c'}; $.each(json1,function(key,value){ //遍历键值对 console.log(key+'````'+value); })
输出的结果为:
key1````a key2````b key3````c