在asp.net 中   在后台写了增加文本框的功能 现在想实现删除文本框的功能(点击一下删除一个文本框)  怎么实现???

解决方案 »

  1.   

    用js实现,点击一下,删除相关的html代码.
    或者后台通过findcontrol方法找到相应控件,删除掉
      

  2.   


    <script type="text/javascript" src="http://www.sharejs.com/software/jquery/jquery-1.3.1.js"></script><table> 
    <tr> 
    <td> <input type="text" id="first" /> </td> 
    <td> <input type="button" value="add" onclick="addInput()"/> </td> 
    </tr> 
    <tr><td id="sharejs"></td> </tr> 
    </table> <script>
    function addInput(){ $("#sharejs").append(" <input type=\"text\" id=\"secnd\" /> "); } 
    </script>