title: How to get Id by ajax
body: <p>I have a table that is contain of <code>Id, user, pass</code>. I want to have <code>id</code> by clicking on the button.
  My code is :</p>
  
  <pre><code>function LoadData(data) {  
          $.each(data, function (key, item) {
              var datea = '&lt;tr&gt;' +
                  '&lt;td&gt;' + item.id + '&lt;/td&gt;' +
                  '&lt;td&gt;&lt;input type="text" value=" ' + item.usser + '"/&gt;&lt;/td&gt;' +
                  '&lt;td&gt;&lt;input type="text" value="' + item.pass + '"/&gt;&lt;/td&gt;' +
                  '&lt;td&gt;&lt;input id="Up" type="button" name="btnUpdate" value="Update" /&gt; ' +
                       '&lt;input type="button" name="btnDelete" id="' + item.id + '" onclick="test();" value="Delete" /&gt;&lt;/td&gt;' +
              '&lt;/tr&gt;';
              $('#customerTable').append(datea);
          });
      };
  
  function test() {
          var customerId = $(this).parent().parent().children().get(0).innerHTML;alert(customerId);
          var data = '{"id":"' + customerId + '"}';    
  }
  </code></pre>
  
  <p>By load data my db files shows on the html page. Function <code>test</code> is for get id of row.</p>