<script language="javascript">
function addoption()
{
var existflag=false,selectflag=false;
for(i=0; i<document.all.source.options.length; i++)
if (document.all.source.options[i].selected == true)
{
selectflag=true;
optionvalue=document.all.source.options[i].value;
var selects=new Option(optionvalue,optionvalue);
for (j=0;j<document.all.destination.options.length;j++)
if (optionvalue==document.all.destination.options[j].value)
existflag=true;
if (existflag==false)
document.all.destination.add(selects);
}
if (selectflag==false)
alert("您还没有选择!");