<script type="text/javascript">
function ToggleList(IDS) {
var CState = document.getElementById(IDS);
if (CState.style.display != "block") { CState.style.display = "block"; }
else { CState.style.display = "none"; }
}
</script>
<style type="text/css">
.divInfo
{
display: none;
}
</style>
<p>Text</p>
<a onclick="ToggleList('LT3')">Show More</a>
</p>
<div id="LT3" class="divInfo">
<p>Additional Test</p>
</div>
这很好用,但我希望在展开切换时将标签“显示更多”更改为“隐藏”。关于如何做到这一点的任何想法?CState.innertext = "隐藏" ?