'下拉菜单增加选项 function fun_window() '循环添加10个 for i=0 to 10 Set NewOpt = document.CreateElement("option")'创建一个下拉菜单选项 NewOpt.value=i'选项值 NewOpt.Text="数据"&i'选项文本 select1.Add NewOpt'将选择添加到下拉菜单 next
end function
'删除选中的下拉菜单选择 function deloption() 'remove删除选项,参数selectedIndex当前选中的是第几项 select1.remove(select1.selectedIndex) select1.selectedIndex=0'设置为0就是设置为当前未选中任何选项 end function