為什么顯示之后li前面的點不見了
<!DOCTYPE html>
<html>
? ? <head>
? ? ? ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
? ? ? ? <title>挑戰題</title>
? ? </head>
? ? <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
? ? <script>
? ? ? ? $(function(){
? ? ? ? ? ? ? ? $('a').click(function(){
? ? ? ? ? ? ? ? ? ? if($('a').html()=='more'){
? ? ? ? ? ? ? ? ? ? ? ? $('a').html("any");
? ? ? ? ? ? ? ? ? ? ? ? $('li[class="h"]').css("display","block");
? ? ? ? ? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? ? ? ? ? $('a').html("more");
? ? ? ? ? ? ? ? ? ? ? ? $('li[class="h"]').css("display","none");
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? });
? ? ? ? ? ? })
? ? </script>
? ? <body>
? ? ? ? <ul>
? ? ? ? ? ? <li>1</li>
? ? ? ? ? ? <li>2</li>
? ? ? ? ? ? <li>3</li>
? ? ? ? ? ? <li>4</li>
? ? ? ? ? ? <li>5</li>
? ? ? ? ? ? <li style="display:none" class="h">6</li>
? ? ? ? ? ? <li style="display:none" class="h">7</li>
? ? ? ? </ul>
? ? ? ? <a href="javascript:;">more</a>
? ? </body>
</html>
2016-06-30
你換成塊狀了 ?你把block換成list-item就好了
2016-06-24
還會顯示啊。? 你查看下是不是你瀏覽器的問題,換個瀏覽器試試。? 畢竟你沒有寫css對list-style進行控制