<SCRIPT LANGUAGE="JavaScript">
<!--
function Add(){
var o = document.createElement("option")
o.text = txtName.value
selList.options.add(o)
}
function Delete(){
selList.options.remove(selList.selectedIndex)
}
//-->
</SCRIPT>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
  <td width="23%"><input type="text" name="txtName" maxlength="9" class="input" size="30">&nbsp;
  <td width="77%"><input name="Submit2" type="submit" class="button" value="Add into List" onclick="Add()">                              
</tr>
<tr>
  <td colspan="2"><p>
<select id="selList" size="5"  style="width:289 ">
</select>
  </p>
<p>
  <input type="button" name="Submit" value="Delete" onclick="Delete()">                            
  </p></td>
</tr>
  </table>

解决方案 »

  1.   

    type="submit" >> type="button"
    onclick="select.options[select.length]=new Option(value,value)"onclick="select.option[select.selectedIndex]=null"
      

  2.   

    harryCom() 
    ---------------
    新加的要在上面,下面要加多了就看不到了
      

  3.   

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function Add(){
    var o = document.createElement("option")
    o.text = txtName.value
    selList.options.add(o,0)
    }
    function Delete(){
    selList.options.remove(selList.selectedIndex)
    }
    //-->
    </SCRIPT>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="23%"><input type="text" name="txtName" maxlength="9" class="input" size="30">&nbsp;
      <td width="77%"><input name="Submit2" type="submit" class="button" value="Add into List" onclick="Add()">                              
    </tr>
    <tr>
      <td colspan="2"><p>
    <select id="selList" size="5"  style="width:289 ">
    </select>
      </p>
    <p>
      <input type="button" name="Submit" value="Delete" onclick="Delete()">                            
      </p></td>
    </tr>
      </table>