可以这样:
for(var i = selOldLength ; i < selOldLength + wantAddLength; ++i){
  sel[i] = new Option(text,value);
}

解决方案 »

  1.   

    sel.options[sel.options.length] = new Option("a","a",true,true)
      

  2.   

    IE 和 Firefox 的 DOM 有很多地方不同的. <script type="text/javascript">
    //<![CDATA[
    function test(prnt){
    var text='just a test';
    var cld=document.createElement('option');
    cld.value=0;

    cld.text=text; // Firefox
    cld.innerText=text; // IE

    prnt.appendChild(cld);
    }
    //]]>
    </script>
    <select id="sel">
    </select>
    <br /><button onclick="test(document.getElementById('sel'))">appendChild</button>
      

  3.   

    这样更 DOM 点, .innerText && .text 不是 DOM 语法<script type="text/javascript">
    //<![CDATA[
    function test(prnt){
    var text=document.createTextNode('just a test');
    var cld=document.createElement('option');
    cld.value=0;

    cld.appendChild(text);

    prnt.appendChild(cld);
    }
    //]]>
    </script>
    <select id="sel">
    </select>
    <br /><button onclick="test(document.getElementById('sel'))">appendChild</button>
      

  4.   

    倒, 上瘾了, DOM 化...<script type="text/javascript">
    //<![CDATA[
    function test(prnt){
    var text=document.createTextNode('just a test');
    var cld=document.createElement('option');
    cld.setAttribute('value', 0);

    cld.appendChild(text);

    prnt.appendChild(cld);
    //alert(document.body.innerHTML);
    }
    //]]>
    </script>
    <select id="sel">
    </select>
    <br /><button onclick="test(document.getElementById('sel'))">appendChild</button>