请教大神错在哪里了呢?
链接一直不能点,请教错在哪了呢
2014-11-07
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>挑战题</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
</head>
<script type = "text/javascript">
$(function(){
$("#aa").click(function(){
var text=$(this).text();
if(text == "更多"){
$("li[class=test1]").show();
$("#aa").html("简化");
}
else if(text =="简化"){
$("li[class=test1]").hide();
$("#aa").html("更多");
}
});
});
</script>
<body>
<ul>
<li title = "test">a</li>
<li title = "test">b</li>
<li title = "test">c</li>
<li title = "test">d</li>
<li title = "test">e</li>
<li class = "test1" style="display:none">f</li>
<li class = "test1" style="display:none">g</li>
<li class = "test1" style="display:none">h</li>
</ul>
<a href = "#" id ="aa">更多</a>
</body>
</html>举报