当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM multiple 属性
The multiple property sets or returns a Boolean value that indicates whether or not multiple items can be selected in a drop-down list.
multiple属性可设置或返回一个布尔值,它代表了下拉列表是否可以进行多个项目的选择
selectObject.multiple=true|false |
<html> <head> <script type="text/javascript"> function selMultiple() { document.getElementById("mySelect").multiple=true } </script> </head> <body> <form> <select id="mySelect" size="4"> <option>Apple</option> <option>Pear</option> <option>Banana</option> <option>Orange</option> </select> <input type="button" onclick="selMultiple()" value="Select multiple"> </form> </body> </html> |
Select multiple options in a dropdown list
下拉列表中进行多个选项的选择