title: JQuery to create dynamic textboxes on button click
body: <p>I am new to jQuery. I want to dynamically add two text boxes with labels <code>firstname</code> and <code>lastname</code> on clicking the "Add" button.</p>
  
  <pre><code>&lt;table border="0" cellspacing="2"&gt;
             &lt;tr&gt;&lt;td style= "width:200px;" align="right"&gt;Name
               &lt;td&gt;
               &lt;input type="text" id="current Name" value="" /&gt;
              &lt;/td&gt;&lt;/td&gt;
             &lt;/tr&gt;                    
                      &lt;tr&gt;
                          &lt;td align="right"&gt;Test value&lt;/td&gt;
                          &lt;td&gt;
                              &lt;select id="test" style= "width:350px;"&gt;                            
                              &lt;/select&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td align="right"&gt;datas&lt;/td&gt;
                          &lt;td&gt;
                 &lt;input type="button" id="add" value="Add" onclick="AddTables();"/&gt;                       
  
                          &lt;/td&gt;
                      &lt;/tr&gt;
  
                      &lt;tr&gt;
                          &lt;td style="height:3px" colspan="2"&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr style="background-color: #383838"&gt;
                          &lt;td&gt;&lt;/td&gt;
                                              &lt;/tr&gt;
                      &lt;tr&gt;
  
                      &lt;/tr&gt;
                      &lt;tr&gt;
  
                          &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/x7uQx/" rel="nofollow">http://jsfiddle.net/x7uQx/</a></p>
  
  <p>I have a limit on adding the text boxes. Maximum of 7. At the same way, is there also a way to delete the text boxes?</p>