remove Method  Internet Development Index --------------------------------------------------------------------------------Removes an element from the collection.Syntaxobject.remove(iIndex)****************************************************
<select id="chk" size=3>
<option>0</option>
<option>1</option>
<option>2</option>
</select>
<input type="button" value="删除" onclick="removeOpt()">
<script language="JavaScript">
<!--
function removeOpt(){
chk.options.remove(0);
}
//-->
</script>

解决方案 »

  1.   

    SELECT有remove(index)方法,删除一项后,后边的自然靠前...
      

  2.   

    <select id="chk" size=3>
    <option>0</option>
    <option>1</option>
    <option>2</option>
    </select>
    <input type="button" value="删除" onclick="removeOpt()">
    <script language="JavaScript">
    <!--
    function removeOpt(){
    var j = chk.options.length;
    for(var i= 0 ; i<j; i++)
    {
    chk.options.remove(0);
    }
    }
    //-->
    </script>
      

  3.   

    var slt = document.getElementById("chk"); //这是SELECT对象
    slt.length = 0; //清空所有项目