删除某选项:
  options.remove(iIndex);  

解决方案 »

  1.   

    添加选项:
    var oOption = document.createElement("OPTION");
    oSelect.options.add(oOption);
    oOption.innerText = "Two";
    oOption.value = "2";
    都是从帮助文档里拷贝来得,
      

  2.   

    以下仅仅是一段示意性代码,
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="javascript">
    function hehe()
    {
    //取得当前选项
    text1=document.all.select1.options[document.all.select1.options.selectedIndex].text;
    index1=document.all.select1.options.selectedIndex;
    //删除
    document.all.select1.options.remove(index1);
    //新增道另一边
    oOption = document.createElement("OPTION");
    document.all.select2.options.add(oOption);
    oOption.innerText = text1;
    }
    </script>
    </head><body>
    <form name="form1" method="post" action="">
      <p>
        <select name="select1" size="4" >
          <option>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
        </select> 
        <input type="button" name="Submit" value="删除" onClick="hehe();">    <select name="select2" size="4">
          <option>a</option>
          <option>b</option>
          <option>c</option>
        </select>
    </p>
      <p>&nbsp;</p>
      <p>&nbsp; </p>
      <p>&nbsp;  </p>
    </form>
    </body>
    </html>
      

  3.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function left()
    {
    if(document.all.select2.selectedIndex>=0)
    {
    var o = new Option();
    o.text = document.all.select2.options[document.all.select2.selectedIndex].text;

    document.all.select1.options.add(o);
    document.all.select2.remove(document.all.select2.selectedIndex);
    }

    }function right()
    {
    if(document.all.select1.selectedIndex>=0)
    {
    var o = new Option();
    o.text = document.all.select1.options[document.all.select1.selectedIndex].text;

    document.all.select2.options.add(o);
    document.all.select1.remove(document.all.select1.selectedIndex);
    }}//-->
    </SCRIPT>
    </HEAD><BODY>
    <form name="form1" method="post" action="">
      <p>
        <select name="select1" size="4" >
          <option>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
        </select> 
    <input type="button" name="Submit" value="<<" onClick="left();">
        <input type="button" name="Submit" value=">>" onClick="right();">    <select name="select2" size="4">
          <option>a</option>
          <option>b</option>
          <option>c</option>
        </select>
    </p>
    </form>
    </BODY>
    </HTML>