title: Remove data in view with jquery
body: <p>I have a view where collecting data in a form. The view is a JSP. </p>
  
  <pre class="lang-js prettyprint-override"><code>$(".remove_field").click(function(e) {
    e.preventDefault();
    var nodeId = $(this).attr('data-remove-id');
    $(nodeId).remove();
  
  });
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;table cellpadding="3" cellspacing="1" border="0" align="middle"&gt;
    &lt;c:if test="${empty rec}"&gt;
      &lt;div id="lesiones" class="lesiones"&gt;
        &lt;tr id="recurso_${loop.index}" class="itemResource" style="text-align:center"&gt;
          &lt;td&gt;
            &lt;img src="gif/b.gif" width="5" height="1"&gt;&lt;a href="#" class="detail-fixed botonLinkHab" cieDesc="idsCie[0]" cieDescShow="descripcionesCie_0" cieCode=""&gt;&lt;img alt="&lt;idioma:idiomaLiterales codLiteral='IML_F22A_35'/&gt;" src="gif/lupa.gif" border="0" align="middle" width="16" height="16"&gt;&lt;/a&gt;
          &lt;/td&gt;
          &lt;td width="100%"&gt;
            &lt;input type="hidden" name="idsCie[0]" value="${requestScope.form.lesionId}" class="dinamic-input-text"&gt;
            &lt;span&gt;&lt;img src="gif/b.gif"&gt;&lt;input height="16" width="16" type="text" name="descripcionesCie[0]" id="descripcionesCie_0" size="107" class="pruebaLU" value="${form.lesionId} - ${form.cie3NoG}"&gt;&lt;/span&gt;
          &lt;/td&gt;
          &lt;td&gt;
            &lt;td width="16" height="16" align="center"&gt;&lt;a href="#" class="remove_field"&gt;eliminar&lt;/a&gt;&lt;/td&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/div&gt;
    &lt;/c:if&gt;
  &lt;/table&gt;
  
  &lt;table id="containerResources"&gt;
    &lt;c:forEach var="item" items="${rec}" varStatus="loop"&gt;
      &lt;tr id="recurso_${loop.index}" class="itemResource" style="text-align:center"&gt;
        &lt;td&gt;
          &lt;img src="gif/b.gif" width="5" height="1"&gt;&lt;a href="#" class="detail botonLinkHab" cieDesc="idsCie[${loop.index}]" cieDescShow="descripcionesCie_${loop.index}" cieCode="${item.lesionId}"&gt;&lt;img alt="&lt;idioma:idiomaLiterales codLiteral='IML_F22A_35'/&gt;" src="gif/lupa.gif" border="0" align="middle" width="16" height="16"&gt;&lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;input type="text" name="idsCie[${loop.index}]" value="${item.lesionId}" class="dinamic-input-text"&gt;
          &lt;span&gt;&lt;img src="gif/b.gif"&gt;&lt;input height="16" width="16" type="text" name="descripcionesCie[${loop.index}]" id="descripcionesCie_${loop.index}" size="107" class="pruebaLU" value="${item.lesionId} - ${item.cie3NoG}"&gt;&lt;/span&gt;
        &lt;/td&gt;
        &lt;td width="20" height="20"&gt;
          &lt;button href="#" class="remove_field" data-remove-id="#recurso_${loop.index}"&gt;&lt;img border="0" src="png/delete.png"/&gt;&lt;/button&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/c:forEach&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>This is correct and it delete elements of view but if add input dynamic and delete in the view, it appear in the value of the form.</p>
  
  <p>What is the solution?</p>