<!DOCTYPE?html>
<html>
<head>
??<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
??<title>挑戰(zhàn)題</title>
</head>
?
<body>
<ul>
??<li>001</li>
??<li>002</li>
??<li>003</li>
??<li>004</li>
??<li>005</li>
??<li>006</li>
??<li>007</li>
</ul>
<a?href="javascript:;">更多</a>
?
<script>
??$(function()
??{
????$("li:eq(2)").css("display","none");
????$("li:eq(3)").css("display","none");
????$("a").click(function()
????{
??????if($("a").text()==="更多")
??????{
????????$("a").text("簡化")
????????$("li:eq(2)").css("display","list-item");
????????$("li:eq(3)").css("display","list-item");
??????}
??????else{
????????$("a").text("更多");
????????$("li:eq(2)").css("display","none");
????????$("li:eq(3)").css("display","none");
??????}
????})
?
??})
?
?
?
?
?
</script>
</body>
</html>
求助?。。?!我這段代碼錯在哪里?怎么沒反應的?
幕布斯6906120
2016-02-21 12:06:43