@
YAFEIML 那缩进什么的就别计较了
<style>
#li2, #li3, #li4 {
display: none;
}
</style>
<button onclick="show(1)">按钮1</button>
<button onclick="show(2)">按钮2</button>
<button onclick="show(3)">按钮3</button>
<button onclick="show(4)">按钮4</button>
<li id="li1">AAAAAA888AAAAAAA</li>
<li id="li2">AAAAAA666AAAAAAA</li>
<li id="li3">AAAAAA555AAAAAAA</li>
<li id="li4">AAAAAA333AAAAAAA</li>
<script>
function show(n) {
document.getElementById('li1').style.display = 'none';
document.getElementById('li2').style.display = 'none';
document.getElementById('li3').style.display = 'none';
document.getElementById('li4').style.display = 'none';
document.getElementById('li'+n).style.display = 'list-item';
}
</script>