這個題是怎麼做的???
jquery版本如下:
var people=[{"name":"1111","email":"eeeee","phone":"112323423"},{"name":"2222","email":"33ddddd","phone":"4444444"}];
var thead=$("<thead></thead>");
var tbody=$("<tbody></tbody>");
var table=$("<table></table>");
thead.append("<tr><th>Name</th><th>Email</th><th>Phone</th></tr>");
people.forEach(function(item){
tbody.append("
table.append(thead).append(tbody);
table.css({"border-collapse":"collapse"}).find("td,th").css({border:"1px solid"});
$("body").append(table);