<SELECT id=select1 name=select1 style="WIDTH: 40px" multiple>
<OPTION value=11 selected>11</OPTION><OPTION 
  value=22>22</OPTION><OPTION value=33>33</OPTION>
</SELECT>
<SELECT id=select2 name=select2 multiple>
</SELECT>
<INPUT type="button" value="Button" id=button1 name=button1 onclick="addslt()"><script language=javascript>
function addslt(){
for (var i=0; i < select1.options.length; ++i){
if (select1.options[i].selected){
var selection = select1.options[i].text;
select2.options[select2.options.length] = new Option(selection);
}
}
}
</script>

解决方案 »

  1.   

    动态赋值选项?options[i].value="abcde"
    你要的会不会是:
    options[i].selected=true;

    selectName.selectedIndex=i;

    selectName.value=options[i].value或者你要的是添加、删除选项:
    selectName.appendChild(new Option("test"));//添加
    selectName.removeChild(selectName.options[i]);//删除,在IE6以前的版本中会出问题,把最后一个option删除后再添加回去可以恢复:selectName.appendChild(selectName.removeChild(selectName.lastChild))