<div style="float:left;">
<select multiple name="left" style="height:170px;width:4em"></select>
</div>
<div style="float:left;margin:4px">
<input type="button" value=">>" onclick="move('left','right')"><br/>
<input type="button" value="<<" onclick="move('right','left')">
</div>
<div style="float:left;">
<select multiple name="right" style="height:170px;width:4em"></select>
</div><script language="javascript">
<!--
var op = ['语文','数学','英语','地理','物理','化学','历史','政治','美术','体育','生物','自然'];
for(i=0; i<10; i++)
left.options[left.length] = new Option( op[i],op[i] );function move( from, to )
{
f = eval(from);
t = eval(to); for(i=0;i<f.length;i++)
{
if( f.options[i].selected == true )
{
t.options[t.length] = new Option( f.options[i].text,f.options[i].value );
f.options.remove(i);
i--;
}
}
}
//-->
</script>
<select multiple name="left" style="height:170px;width:4em"></select>
</div>
<div style="float:left;margin:4px">
<input type="button" value=">>" onclick="move('left','right')"><br/>
<input type="button" value="<<" onclick="move('right','left')">
</div>
<div style="float:left;">
<select multiple name="right" style="height:170px;width:4em"></select>
</div><script language="javascript">
<!--
var op = ['语文','数学','英语','地理','物理','化学','历史','政治','美术','体育','生物','自然'];
for(i=0; i<10; i++)
left.options[left.length] = new Option( op[i],op[i] );function move( from, to )
{
f = eval(from);
t = eval(to); for(i=0;i<f.length;i++)
{
if( f.options[i].selected == true )
{
t.options[t.length] = new Option( f.options[i].text,f.options[i].value );
f.options.remove(i);
i--;
}
}
}
//-->
</script>
[email protected]
function moveoption(o,n){
for(i=o.length-1;i>-1;i--){
if(o.options[i].selected==true){
var nOption=document.createElement('OPTION');
n.options.add(nOption);
nOption.innerText=o.options[i].text;
nOption.Value=o.options[i].value;
o.options.remove(i);
}
}
}
</script>
<select name=oldsel size="10" multiple ondblclick="moveoption(this,document.all.newsel)">
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
</select>
<input type=button value=">>" onclick="moveoption(document.all.oldsel,document.all.newsel)">
<input type=button value="<<" onclick="moveoption(document.all.newsel,document.all.oldsel)">
<select name="newsel" size="10" multiple ondblclick="moveoption(this,document.all.oldsel)">
</select>