<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> </TITLE>
<script language="javascript">
function Change(inObj1,inObj2)
{
var CtlBox1 = document.all.item(inObj1);
var CtlBox2 = document.all.item(inObj2);
<script language="javascript">
var listbox1 = null;
var listbox2 = null;
function window.onload()
{
listbox1 = document.getElementById("ListBox1");
listbox2 = document.getElementById("ListBox2");
}
function add()
{
if(listbox1.selectedIndex == -1)
{
window.alert('请先选择ListBox1数据项!');
return;
}
listbox2.options[listbox2.length] = new Option(listbox1.options [listbox1.selectedIndex].text,listbox1.options[listbox1.selectedIndex].value);
listbox1.options[listbox1.selectedIndex] = null;
}
function addall()
{
var init_index = listbox2.length;
var count = listbox1.length;
for(var i=0;i<count;i++)
{
var index = init_index +i;
listbox2.options[index] = new Option(listbox1.options [0].text,listbox1.options[0].value);
listbox1.options[0] = null;
}
}
</script>