怎么用JavaScript获取DropDownList选中得值,再添加到listbox中
怎么用JavaScript获取DropDownList选中得值,再添加到listbox中
var select1 = document.all.<%= yourDropDownList.ClientID %>;
var select1value = select1.options[select1.selectedIndex].value;
var select1Text = select1.options[select1.selectedIndex].innerText;
var select2 = document.all.<%= yourListBox.ClientID %>;
var oOption = document.createElement("OPTION");
select2.options.add(oOption);
oOption.innerText = select1Text
oOption.Value = select1value ;