简单教程
提交运行
代码编辑器:
<script> function displayResult(){ document.getElementById("mySelect").size=4; } </script> <form> <select id="mySelect"> <option>Apple</option> <option>Pear</option> <option>Banana</option> <option>Orange</option> </select> </form> <button type="button" onclick="displayResult()">修改大小</button>
运行结果: