js如何删除option
1、动态创建select function createSelect(){var mySelect = document.createElement("select"); mySelect.id = "mySelect"; document.body.appendChild(mySelect); }

3、 //添加一个选项obj.add(new Option("文本","值")); //这个只能在IE中有效 obj.options.add(new Option("text","value")); //这个兼容IE与firefox }

5、删除一个选项optionfunction removeOne(){ var obj=document.getElementById('mySelect'); //index,要删除选项的序号,这里取当前选中选项的序号var index=obj.selectedIndex;obj.options.remove(index); }
