HTML DOM multiple ÊôÐÔ
¶¨ÒåºÍÓ÷¨
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>