<select name="select1">
  <option value="1">新闻标题</option>
  <option value="2">软件名称</option>
  <option value="3">商品名称</option>
</select>
<input type="button" onclick="
var i=0;
while(i<select1.options.length){
  text.value+=select1.options[i++].text; 
}
">
<input type="text" name="text">

解决方案 »

  1.   

    <form name=addForm method=post action="xxx">
        <tr>
            <td width="213" align=right bgcolor=#EEEEEE class="input_title_color"> 地区: </td>
            <td width="160" align=left class="input_content_color">
    <select name="areaids"  size="8">
                <kmcrmhtml:opt  valuefield="areaid" textfield="areaname" tablename="sys_area_info" /> //自己写的标签,从数据库中读取数据,显示成select的形式
              </select> </td><td width="170">
        <input type="button" onclick="move_to_f(1);" value=" > "><br>
    <input type="button" onclick="move_to_f(-1);" value=" < ">
    </td><td width="499">
              <select name="area_object" multiple  size="8" style="width:120px">
              </select>
              </td>
          </tr>
    function move_to_f(aspect){
        if(aspect==1){
       moveItem("areaids","area_object");
    //var objOption = new Option("1","1");
          // document.all.objecttypelist.add(objOption);
    }else{
    var sIndex=document.all.areaids.selectedIndex;
        if(document.all.areaids.selectedIndex==-1){
    sIndex=0;
         }
        document.all.areaids.remove(sIndex);
    }
      }
      function moveItem(fromName,targetName){
    var temp;
    eval("temp=document.all."+fromName);
    if(temp.selectedIndex==-1){
            temp.options[0].selected=true;
        }
        var objOption = new Option(temp.options[temp.selectedIndex].text,temp.value);
    if(temp.selectedIndex!=-1){
        temp.remove(temp.selectedIndex);
        }
    eval("temp=document.all."+targetName);
        temp.add(objOption);
    }//你自己再好好研究研究把,给你一个和你要的差不多的例子
    //其实javascript就这么几种用法。