出现一样的表单呢  而且前面的表单用户输入的内容不还在上面  
是用document.getElementById("").name=""做得吗
具体的代码是怎么样的呢?
急用啊!

解决方案 »

  1.   


    楼主你是想把用户输入的内容加入到select下拉框里是吗?
      

  2.   

    <input type="text" id="text" />
            <select id="sel" style="width:200px;"></select>
            <input type="button" id="btn" />
       <script>
    document.getElementById('btn').onclick = function(){
    var value = document.getElementById('text').value;
    var option = document.createElement('option');
    option.value = value;
    option.innerHTML = value;
    document.getElementById('sel').appendChild(option);
    };
            </script>这个意思?
      

  3.   

    万能的js,强大的jquery只有你想不到没有办不到。<select id="gg"></select>
    <input type='text' id="zhi" />
    <input type='button' value='点击添加文本框的内容进下拉框' onclick='jin()' /><script type="javascript/css">
    function jin(){
    var va = $("#zhi").val().trim();
    var op=$("<option></option>");
    op.text(va);
    op.appendTo($("#gg"));
    }
    </script>
      

  4.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TEST</title></head>
    <body>
    <input type="button" value="click me" id="btn" />
    <table>
    <tbody id="tab">
    <tr>
         <td><input type="text"  /></td>
            <td><select><option></option></select></td>
        </tr>
        </tbody>
    </table><script type="text/javascript">
        document.getElementById('btn').onclick = function(){

    var tab = document.getElementById('tab');
    var input = document.createElement('input');
    input.type = 'text';
    var _select = document.createElement('select');
    var option = document.createElement('option');
    _select.appendChild(option);
    var tr = document.createElement('tr');
    var td = document.createElement('td');
    var td2 = document.createElement('td');

    td.appendChild(input);
    td2.appendChild(_select);

    tr.appendChild(td);
    tr.appendChild(td2);

    tab.appendChild(tr);
    };
    </script>
    </body>
    </html>