title: How to get the Dynamic Table cell value on button click
body: <p>I've a table which is dynamically generated. In its row, I'm placing buttons.</p>
  
  <pre><code>for (var i = 0; i &lt; resp.length; i++) {    
    tr = tr + "&lt;tr&gt;";    
    tr = tr + "&lt;td &gt;" + resp[i].Date + "&lt;/td&gt;";
    tr = tr + "&lt;td &gt;" + resp[i].age + "&lt;/td&gt;";
    tr = tr + "&lt;td &gt;" + resp[i].Hour + "&lt;/td&gt;";               
    tr = tr + "&lt;td&gt;&lt;input value='get me' type='button' class='theButton' id='ma' onclick='test()'&gt;&lt;/td&gt;";
    tr = tr + "&lt;/tr&gt;";
  };
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/dRCvZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dRCvZ.png" alt="table"></a></p>
  
  <p>On a button click, I'd like to get the particular cell value of that row. E.g.: If I click on the age in the first row, then the value I have to get is 50. And if I click on the button in second row, then I should get 94. </p>
  
  <p>How can I get the table cell value on a button click?</p>