select

select:
                selectedIndex: 选中的option的索引;
                var option = new option('河北','hb');//新创建一个option;
                options.add(option);//新增一个option
                options.remove(要删除的索引);//删除一个option;
                
                            window.onload=function(){
                                            var oS1=document.getElementById("s1");
                                            var aO=oS1.options;  //选中oS1下面所有的option;
                                            var option=new Option('河北','hb');
                                            oS1.add(option);//增加一个option
                                            oS1.remove(1);//删除下标为1的option
                            
                                            alert(aO.selectedIndex); //当前选中的option的文本
                                            alert(aO[oS1.selectedIndex].innerHTML);//当前选中的option文本的内容1;
                                            alert(aO[oS1.selectedIndex].text);//当前选中的option文本的内容2;
                            }

人生如戏,或实力或演技
原文地址:https://www.cnblogs.com/yang0902/p/5697991.html