梅花雪版主请进。。。
梅花雪,你好。还是上次的问题,两个select互相联动的操作
下面是你给我的代码,但是我发现把select1的内容添加到select2后,在处理表
单页面接收不到select2的值呀?!为什么?!!困惑我有一个多月了。。。
<table border=0 cellpadding=0 cellspacing=0>
<form name=form1 action="hh_action.asp" method="post">
<tr><td>
<select name=list1 size=8 ondblclick="moveOption(this, this.form.list2)">
<option value=A>aaaaaaaaaa
<option value=B>bbbbbbbbbb
<option value=C>cccccccccc
<option value=D>dddddddddd
<option value=E>eeeeeeeeee
<option value=F>ffffffffff
<option value=G>gggggggggg
<option value=H>hhhhhhhhhh
</select></td>
<td width=40 align=center>
<input name=add type=button value=">>>" onclick="moveOption(this.form.list1, this.form.list2)"><br/><br/>
<input name=sub type=button value="<<<" onclick="moveOption(this.form.list2, this.form.list1)">
</td><td>
<select name=list2 size=8 ondblclick="moveOption(this, this.form.list1)">
</select>
<input type=submit>
</td></tr>
</form>
</table>
<script language="JavaScript"><!--
function moveOption(e1, e2){
try{
var e = e1.options[e1.selectedIndex];
e2.options.add(new Option(e.text, e.value));
e1.options.remove(e1.selectedIndex);
} catch(e){}
}
//--></script>