求問(wèn)題所在
<!DOCTYPE html>
<html>
? ? <head>
? ? ? ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
? ? ? ? <title>挑戰(zhàn)題</title>
? ? ? ? <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
? ? </head>
? ? <body>
? ? ? ? <input type="button" value="顯示">
? ? ? ? <ul></ul>
? ? ? ? <script>
? ? ? ? $(function(){
? ? ? ? ? ? var students=[
? ? ? ? ? ? ? ? {name:"k999",sex:"man",age:"20"},
? ? ? ? ? ? ? ? {name:"k888",sex:"woman",age:"20"},
? ? ? ? ? ? ? ? {name:"k777",sex:"woman",age:"21"}
? ? ? ? ? ? ? ? ];
? ? ? ? ? ? $("input").bind("click",function(){
? ? ? ? ? ? ? ? $(this).hide();
? ? ? ? ? ? ? ? $.each(students,function(index.st){
? ? ? ? ? ? ? ? ? ? $("ul").append("<li>name:"+st.name+" sex:"+st.sex+" age:"+st.age+"</li>") ? ?
? ? ? ? ? ? ? ? })
? ? ? ? ? ? })
? ? ? ? })
? ? ? ? </script>
? ? </body>
</html>
2016-03-07
注意中文逗號(hào)和英文逗號(hào):)