title: How To add and delete input value using jquery?
body: <p>I have input and add a button. once I click on the add button the input value should save table row and I need a delete button here. That value I need to delete individual. I need to save many values. I tried in jquery I get the added value in the table but I'm unable to delete the value. below is my code. Thanks in Advance.</p>
  
  <p><a href="https://i.stack.imgur.com/mqmRE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mqmRE.jpg" alt="Image"></a></p>
  
  <pre><code>&lt;div class="col-sm-6 col-md-5"&gt;
                &lt;div class="form-group"&gt;
                  &lt;label class="control-label" for="supplyingLocation"&gt;Supplying to Location &lt;span class="text-danger"&gt;*&lt;/span&gt;&lt;/label&gt;
                  &lt;div class="input-group"&gt;
                  &lt;input type="text" class="form-control" placeholder="Enter Supplying Location Name" name="supplyingLocation" id="supplyingLocation" required="required"&gt;
                  &lt;div class="input-group-btn"&gt;
                    &lt;button class="btn btn-primary add-supplying-location-row" type="button"&gt;Add Location &lt;/button&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clear"&gt;&lt;/div&gt;
              &lt;div class="col-sm-5"&gt;
                  &lt;div class="listing-table"&gt;
                  &lt;div class="table-responsive sup-loc-table"&gt;
                  &lt;table class="table table-bordered"&gt;
                    &lt;thead&gt;
                        &lt;tr&gt;
                          &lt;th&gt;Supplying to Location&lt;/th&gt;
                          &lt;th&gt;Action&lt;/th&gt;
                        &lt;/tr&gt;
                    &lt;/thead&gt;
                    &lt;tbody&gt;&lt;/tbody&gt;
                  &lt;/table&gt;
                  &lt;/div&gt;
  
            &lt;/div&gt;
            &lt;/div&gt;
  
   &lt;script&gt;
      $(document).ready(function(){
          $(".add-supplying-location-row").click(function(){
              var supname = $("#supplyingLocation").val();
              $('#supplyingLocation').val('');
              var supmarkup = "&lt;tr&gt;&lt;td&gt;" + supname + "&lt;/td&gt;&lt;td&gt;&lt;input type='button' name='supplyingLocRecord' value='Delete' id='deletesupLoc'&gt;&lt;/td&gt;&lt;/tr&gt;";
              $(".sup-loc-table table tbody").append(supmarkup);
  
          });
  
          // Find and remove selected table rows
  
          $("#deletesupLoc").click(function(){
              $(".sup-loc-table table tbody").find('input[name="supplyingLocRecord"]').each(function(){
                  {
                      $(this).parents("tr").remove();
                  }
              });
          });
      });    
  &lt;/script&gt;
  </code></pre>