简单教程
提交运行
代码编辑器:
<script> function displayResult(){ document.getElementById("ul1").style.listStyle="decimal inside"; } </script> <ul id="ul1"> <li>Coffee</li> <li>Tea</li> <li>Water</li> <li>Soda</li> </ul> <br> <button type="button" onclick="displayResult()">修改列表style</button>
运行结果: