将下拉列表转换为多行列表

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function changeSize()
  5. {
  6. document.getElementById("mySelect").size=4
  7. }
  8. </script>
  9. </head>
  10. <body>
  11.  
  12. <form>
  13. <select id="mySelect">
  14. <option>苹果</option>
  15. <option>桃子</option>
  16. <option>香蕉</option>
  17. <option>桔子</option>
  18. </select>
  19. <input type="button" onclick="changeSize()" value="改变大小">
  20. </form>
  21.  
  22. </body>
  23. </html>