<body>
<select id= "S1" size= "ten" >
<option> Red </option>
<option> Green </option>
<option> Blue </option>
<option> Black </option>
<option> White </option>
</select>
<select id= "S2" size= "ten" >
<option> Apple </option>
<option> Banana </option>
<option> Peaches </option>
<option> pear </option>
<option> oranges </option>
</select><br/>
<input type= "button" id= "T1" value= " move right "/>
<input type= "button" id= "T2" value= " shift left "/>
<script>
document.getElementById ("T1"). Onclick=function () { ----- Move right
var Op=document.getelementbyid ("S1"). Selectedoptions; --------- Assign the selected data to the op
document.getElementById ("S2"). AppendChild (op[0]); ------ indicates that the index value in the selected data is 0
document.getElementById ("S1"). RemoveChild (Op[0]);
}
document.getElementById ("T2"). Onclick=function () { ---- move left
var Op=document.getelementbyid ("S2"). Selectedoptions;
document.getElementById ("S1"). AppendChild (Op[0]);
document.getElementById ("S2"). RemoveChild (Op[0]);
}
</script>
</body>
List move around 2017-03-23