<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>挑战题</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<style>
td{border:1px solid red}
</style>
</head>
<body>
<input type="button" id="btn" value="clickMe" />
<table id="myTable" style="border:1px solid red;border-collapse:collapse">
<tr>
<td>姓名</td>
<td>年龄</td>
<td>身高</td>
<td>配偶</td>
<td>婚姻批言</td>
</tr>
</table>
<script>
$(document).ready(function(){
var students=[
{"name":"罗琛","age":"22","height":"150","mate":"金颖婕","comment":"金玉良缘"},
{"name":"姜磊","age":"22","height":"180","mate":"金颖婕","comment":"金石为开"},
{"name":"金颖婕","age":"22","height":"160","mate":"搞不清楚","comment":"无能为力"},
];
$('#btn').bind("click",function(){
$.each(students,function(index,student){
$('table').append("<tr><td>"+student.name+"</td><td>"+student.age+"</td><td>"+student.height+"</td><td>"+student.mate+"</td><td>"+student.comment+"</td></tr>");
});
});
});
</script>
</body>
</html>