<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < html xmlns ="http://www.w3.org/1999/xhtml" > < head > < meta http-equiv ="Content-Type" content ="text/html; charset=gb2312" /> < title > 无标题文档 </ title > < script language ="javascript" > ... function moveOpR()...{ var os=document.getElementById("s"); var os2=document.getElementById("s2"); if(os.options.length>=1)...{ var txt=os.options[os.options.selectedIndex].text; var val=os.options[os.options.selectedIndex].value; var op=new Option(txt,val,true,true); os2.options.add(op); os.remove(os.options.selectedIndex); }}function moveOpL()...{ var os=document.getElementById("s"); var os2=document.getElementById("s2"); if(os2.options.length>=1)...{ var txt=os2.options[os2.options.selectedIndex].text; var val=os2.options[os2.options.selectedIndex].value; var op=new Option(txt,val,true,true); os.options.add(op);//[os2.options.length]=op; os2.remove(os2.options.selectedIndex); } } </ script > </ head > < body > < select name ="s" size ="4" id ="s" ondblclick ="moveOpR()" > < option > 1 </ option > < option > 2 </ option > < option > 3 </ option > < option > 4 </ option > < option > 5 </ option > < option > 6 </ option > </ select > < select name ="s2" size ="4" id ="s2" ondblclick ="moveOpL()" > < option > 7 </ option > < option > 8 </ option > < option > 9 </ option > < option > 10 </ option > < option > 11 </ option > < option > 12 </ option > </ select > </ body > </ html >