这样可以吗?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>挑战题</title>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li style="display:none">3</li>
<li style="display:none">4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<a href="javascript:void()" onclick="fn()">更多</a>
</ul>
<script language="javascript">
function fn()
{
var n=document.getElementsByTagName("a")[0];
var m=document.getElementsByTagName("li");
if(n.innerText=="更多")
{
n.innerText="简化";
m[2].style.display="";
m[3].style.display="";
}
else
{
n.innerText="更多";
m[2].style.display="none";
m[3].style.display="none";
}
}
</script>
</body>
</html>