multiple 属性可设置或返回是否可有多个选项被选中。
注释:Opera 9 无法在脚本中设置该属性,仅能返回它。
selectObject.multiple=true|false
The following example returns the id of the dropdown list:
<html>
<head>
<script type="text/javascript">
function selectMultiple()
{
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="selectMultiple()"
value="Select multiple">
</form>
</body>
</html>