将下拉列表转换为多行列表
- <html>
- <head>
- <script type="text/javascript">
- function changeSize()
- {
- document.getElementById("mySelect").size=4
- }
- </script>
- </head>
- <body>
- <form>
- <select id="mySelect">
- <option>苹果</option>
- <option>桃子</option>
- <option>香蕉</option>
- <option>桔子</option>
- </select>
- <input type="button" onclick="changeSize()" value="改变大小">
- </form>
- </body>
- </html>