请问大神 为啥each方法遍历json对象 遍历出来的答案会重复几次
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>挑战题</title>
<style>
div{
width:200px;
height:200px;
background:#ccc;
}
</style>
<script src="https://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
</head>
<body>
<div id="box"></div>
<input type="button" value="each查看资料">
<script>
var testJson={
class:"电子商务",
name:"zhansgan",
sex:"man",
height:"170cm"
};
$("input").click(function(){
$.each(testJson,function(index,ele){
$("#box").append($("<li>班级:"+testJson.class+"</li>"+"<li>名字:"+testJson.name+"</li>"))
})
});
</script>
</body>
</html>