求查错each()
求查错,如何安排,感觉自己写代码有点乱
2015-10-02
<script> var stu=[{"name":"Jason","age":"25","score":"98"}, {"name":"Bob","age":"22","score":"91"}, {"name":"Sarra","age":"27","score":"89"},]; $("#click").bind("click",function(){ $.each(stu,function(index,obj){ $("#studentInfo").append("<tr><td>"+obj.name+"</td>+<td>"+obj.age+"</td>+<td>"+obj.score+"</td></tr>") }) }) </script>
代码乱当然不好查错,)}这里写反了应该是})才对。
举报