title: jQuery remove <form> from a <div>
body: <p>I've asked about this very example in another question:<br>
  <a href="https://stackoverflow.com/questions/8914161/fill-in-a-form-with-jquery">Fill in a form with jQuery</a><br>
  but I preferred to create a new one to ask some other details.<br>
  I have a div (panel) which currently contains only one form.<br>
  This form should represent a list of coordinates. It has some buttons '+' '-' to add or remove a couple of coordinates (and thus the form).
  Each form is generated automatically by a function and has its own id.</p>
  
  <pre><code>&lt;div id="panel" style="position: absolute; left: 190px; top: 300px; width: 400px; height: 300px; border: medium groove brown; background: none repeat scroll 0% 0% black; z-index: 100; color: white;"&gt;  
  &lt;form id="form_coord_0"&gt;  
  X &lt;input type="text" style="height: 25px; font-size: 10px;" size="2" name="X" id="coordX_0"/&gt;  
  Y &lt;input type="text" style="height: 25px; font-size: 10px;" size="2" name="Y" id="coordY_0"/&gt;  
  &lt;input type="button" id="edit_0" value="M"/&gt;  
  &lt;input type="button" id="remove_0" value="-"/&gt;  
  &lt;input type="button" id="add_0" value="+"/&gt;  
  &lt;input type="button" id="go_0" value="go!"/&gt;  
  &lt;br/&gt;  
  &lt;/div&gt;  
  </code></pre>
  
  <p>I am looking for a way to:<br>
  - remove a line and the associated form<br>
  - remove all lines and then all the forms  </p>
  
  <p>I have this function:  </p>
  
  <pre><code>function add_form(id_coord){  
      var new_form="&lt;form id= '"+ id + "'&gt; &lt;/form&gt;";
      $("#panel").append(new_form);
  }
  </code></pre>
  
  <p>which adds one form.<br>
  And a for loops that add different lines.<br>
  Once a line have to be deleted I'd prefer to edit the underlying data structure and empty the div. Then it could be repopulated by another for loop.
  The question is the following: how do I delete one form or every form of the div?
  I thought about setting div.innerHTML to "" but I really don't like that solution.</p>