title: How to get html <td> values using javascript in grid table
body: <p>I'm using mvc, I want to get the value of each and every <code>td</code> to edit in my <code>table</code></p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
           &lt;td id="val"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;input type="button" value="" class="edit"/&gt;
  </code></pre>
  
  <p>And in the javascript am using</p>
  
  <pre><code>var td = $(document).getElementById("val").innetHTML;
  
  $(document).on('click', '.edit', function (e) {
      if(td == null)
      {
  
      }
      else
          code......
  })
  </code></pre>
  
  <p>But whenever am clicking the row edit button it is returning only the first row value, not getting the value of second and further. </p>
  
  <p>Any suggestion will be greatly appreciated.</p>