怎么else那段沒生效
<!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>
? ? ? ? <style>
? ? ? ? ? ? .l1{display:none;}
? ? ? ? </style>
? ? </head>
? ??
? ? <body>
? ? <script>
? ? ? ? $(function(){
? ? ? ? ? ?var text=$('a').html();
? ? ? ? ? ?$("a").click(function(){
? ? ? ? ? ? ? ?if(text=="更多"){
? ? ? ? ? ? ? ? ? ?$("a").html("簡(jiǎn)化");
? ? ? ? ? ? ? ? ? ?$(".l1").css('display','block');
? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ?}else{
? ? ? ? ? ? ? ? ? ?$('a').html('更多');
? ? ? ? ? ? ? ? ? ?$('.l1').css('display','none');
? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ?
? ? ? ? ? ?});
? ? ? ? ? ? });
? ? ? ??
? ? </script>
? ? <ul>
? ? ? ? <li>1</li>
? ? ? ? <li>1</li>
? ? ? ? <li>1</li>
? ? ? ? <li>1</li>
? ? ? ? <li>1</li>
? ? ? ? <li class="l1">1</li>
? ? ? ? <li class="l1">1</li>
? ? ? ? <a href="#">更多</a>
? ? ? ??
? ? </ul>
? ??
? ? ? ??
? ? </body>
</html>
2016-02-27
2016-02-26