<table id="table1" width="495" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="150"> <div align="center">
<input name="textleibie" type="text" id="textleibie" value="a" size="20">
</div></td>
<td width="141" rowspan="2"> <div align="center"> </div></td>
<td width="204" rowspan="9"><select name="selectcombine" size="10" id="selectcombine" multiple style="width:200px;">
</select></td>
</tr>
<tr>
<td rowspan="8"><div align="center">
<select name="selectleibie" id="selectleibie" size="10" multiple style="width:150px;"onchange="Javascript:textleibie.value=selectleibie.options[selectleibie.selectedIndex].text;">
<option value="a">a</option>
<option value="b">b</option>
<option value="c">c</option>
</select>
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="Submit->" type="button" id="Submit->" style="cursor: hand;height:36;width:36; background-color: #E8EFFF; border: 1 solid #3366CC;" value="->" onclick="add()">
</div></td>
</tr>
<tr>
<td><div align="center"> </div></td>
</tr>
<tr>
<td><div align="center">
<input name="Submit<-" type="button" id="Submit<-" style="cursor: hand;height:36;width:36; background-color: #E8EFFF; border: 1 solid #3366CC;" value="<-" onclick=del()>
</div></td>
</tr>
</table>
<script LANGUAGE="Javascript">function add()
{ //selectcombine.options.add(new Option("'" + textleibie.value + "'"));
var flag = true;
for(var i=0;i<selectcombine.options.length;i++)
{
if (selectcombine.options[i].innerText==textleibie.value)
{
flag=false;
}
}
if (flag==true)
{
selectcombine.options.add(new Option(textleibie.value));
}}
function del()
{
if(selectcombine.selectedIndex != -1)
{selectcombine.options[selectcombine.selectedIndex] = null}
}
</script>
<tr>
<td width="150"> <div align="center">
<input name="textleibie" type="text" id="textleibie" value="a" size="20">
</div></td>
<td width="141" rowspan="2"> <div align="center"> </div></td>
<td width="204" rowspan="9"><select name="selectcombine" size="10" id="selectcombine" multiple style="width:200px;">
</select></td>
</tr>
<tr>
<td rowspan="8"><div align="center">
<select name="selectleibie" id="selectleibie" size="10" multiple style="width:150px;"onchange="Javascript:textleibie.value=selectleibie.options[selectleibie.selectedIndex].text;">
<option value="a">a</option>
<option value="b">b</option>
<option value="c">c</option>
</select>
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="Submit->" type="button" id="Submit->" style="cursor: hand;height:36;width:36; background-color: #E8EFFF; border: 1 solid #3366CC;" value="->" onclick="add()">
</div></td>
</tr>
<tr>
<td><div align="center"> </div></td>
</tr>
<tr>
<td><div align="center">
<input name="Submit<-" type="button" id="Submit<-" style="cursor: hand;height:36;width:36; background-color: #E8EFFF; border: 1 solid #3366CC;" value="<-" onclick=del()>
</div></td>
</tr>
</table>
<script LANGUAGE="Javascript">function add()
{ //selectcombine.options.add(new Option("'" + textleibie.value + "'"));
var flag = true;
for(var i=0;i<selectcombine.options.length;i++)
{
if (selectcombine.options[i].innerText==textleibie.value)
{
flag=false;
}
}
if (flag==true)
{
selectcombine.options.add(new Option(textleibie.value));
}}
function del()
{
if(selectcombine.selectedIndex != -1)
{selectcombine.options[selectcombine.selectedIndex] = null}
}
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货