创建Option对象

var option1 = document.createElement('option');

动态创建Option对象

function createSelect(){ 
    var new_option= document.createElement("select");  
    new_option.id = "mySelect";  
    document.body.appendChild(new_option); 
} 

获得选项option的值

var obj=document.getElementById('mySelect'); 
var index=obj.selectedIndex;     //序号,取当前选中选项的序号 
var val = obj.options[index].value; 

获得选项option的文本

var obj=document.getElementById('mySelect'); 
var index=obj.selectedIndex; //序号,取当前选中选项的序号 
var val = obj.options[index].text; 

修改选项option

var obj=document.getElementById('mySelect'); 
var index=obj.selectedIndex; //序号,取当前选中选项的序号 
var val = obj.options[index]=new Option("文本","值"); 

删除select

function removeSelect(){ 
    var mySelect = document.getElementById("mySelect"); 
    mySelect.parentNode.removeChild(mySelect); 
} 

denson
366 声望57 粉丝