|
ÁбíÒ» |
²Ù×÷ |
Áбí¶þ |
|
|
//½«Áбí¿ò1ÖеÄÑ¡¶¨²¿·ÖÒÆµ½Áбí¿ò2ÖÐ
function Go_Left()
{
for (i=0 ; i<=form2.select2 .options .length -1 ; i++)
{
//Èç¹ûÕâÌõ±»Ñ¡ÖÐÔò¸´ÖƵ¹Áбí¿ò1ÖÐ
if (form2.select2 .options [i].selected)
{
var element = window.Option.create (form2.select2.options [i].text,
form2.select2 .options[i].value,0);
form1.select1.add (element);
}
}
var j = 0 ;
//ɾ³ýÑ¡¶¨¼Ç¼
for (i=0 ; i< form2.select2 .options .length ; i++)
{
if (form2.select2 .options [i].selected)
{
form2.select2.remove(i);
i = i - 1 ;
}
}
}
//½«Áбí¿ò2ÖеÄÑ¡¶¨²¿·ÖÒÆµ½Áбí¿ò1ÖÐ
function Go_Right()
{
for (i=0 ; i<=form1.select1 .options .length -1 ; i++)
{
if (form1.select1 .options [i].selected )
{
var element = window.Option.create (form1.select1.options [i].text,
form1.select1 .options[i].value,0);
form2.select2.add (element);
}
}
for (i=0 ; i< form1.select1 .options .length ; i++)
{
if (form1.select1 .options [i].selected )
{
form1.select1.remove(i);
i = i - 1 ;
}
}
}

