如何取<select>的值
现在我有一个表单,里面有两个 <select>,其中为sel1和sel2,需要把sel1里面的内容添加到sel2里面去,最后把sel2里面的值取出来,代码如下: <form name="myform" action="save.asp" method="post">
<table width="240" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="40%" align="right">
<select name="sel_rev1" id="sel_rev1" size="9" multiple>
<%
do while not rs.eof
%>
<option value=" <%=rs("user")%>"> <%=rs("user")%> </option>
<%
rs.MoveNext
loop
rs.close
set rs=nothing
%>
</select>
</td>
<td width="20%" align="center" valign="middle"> <input name="sure2" type="button" id="sure2" onClick="allsel(document.myform.sel_rev1,document.myform.sel_rev2);" value="增加" align="center" height="2"> <p>
<input name="sure1" type="button" id="sure1" onClick="allsel(document.myform.sel_rev2,document.myform.sel_rev1);" value="删除">
</td>
<td width="40%" align="left"> <select name="sel_rev2" size="9" multiple id="sel_rev2" style="width:100px ">
</select>
</td>
</tr>
</table>
</form>