首先给要隐藏或显示的部分所在标签一个惟一的ID,比如将它们放到一个<div id="div1"></div>里
然后给某个实体(按你的意思来,就是"列表元素")的onclick事件写一个响应的方法,方法中用上类似以下的语句:
document.all["div1"].style.display="block"//显示
或
document.all["div1"].style.display="none"//隐藏
其中"div1"就是要显示或隐藏的部分的ID。
<!DOCTYPE HTML><html>
<body>
<details>
<summary>Copyright 2011.</summary>
<p>All pages and graphics on this web site are the property of W3School.</p>
</details>
</body>
</html>