Option.selected=true ;
Input.add(Option);

解决方案 »

  1.   

    or:Input.options[Input.options.length] = new Option("","",true,true)
      

  2.   

    Option.selected=true ;
    Input.add(Option);
    这个不行!
      

  3.   

    Input.options[Input.options.length] = new Option("","",true,true)
    也不行!还是没增加默认空值!
      

  4.   

    你试没有试啊就说不行????
    <script>
    window.onload = function()
    {
     Input = document.getElementById("s")
     Input.options[Input.options.length] = new Option("","",true,true)
    }
    </script>
    <body>
    <select id=s><option>aaa</select>
    </body>
      

  5.   

    你的代码是可以,但是我的情况是有点不同,我是动态在表格种增加一行,动态在在某列增加一个下拉框的。
    row = eval("document.all[" + '"' + id + '"' + "]").insertRow();
    selectCell = row.insertCell();
    xxxCell = row.insertCell();var Option = document.createElement("option");
    Option.text='';
    Option.value='' ;
    Option.selected=true ;
    Input.add(Option);
    selectCell.appendChild(Input);
    我是这样增加的,用你给的方法,不行。