<script language=”JavaScript”>
function len(){
m=0;
for(i=0;i<document.getElementById(‘tt’).length;i++){
if(document.getElementById(‘tt’)[i].selected==true){
m++;
}
}
alert(m+’个选择被选中’);
}
</script>
<select multiple=”true” name=”tt” id=”tt” onclick=”len()”>
<option value=”123″ selected=”selected”>123
<option value=”456″>456
<option value=”789″>789
</select>
···
···