下拉框操作
//删除select里的所有内容document.getElementById(id).options.length=0; //动态删除select中的某一项optiondocument.getElementById(id).options.remove(indx); //设置默认选项document.getElementById(id)..selectedIndex = 0;//添加选项document.getElementById(id).options.add(new Option(text, value));//获取当前选中的值document.getElementById(id).value;//获取所有值的对象 为数组var Obj = new Array();Obj = document.getElementById(id).options;//得到select的当前选中项的text var currSelectText = document.getElementById(id).options[document.getElementById(id).selectedIndex].text;
?