title: FInd a control s value inside a table in tr
body: <p>I have this table and I want to find a hidden control's value inside the <code>tr</code> .</p>
  
  <p>I tried this javascript </p>
  
  <pre><code>function DeleteGridview_Row(pid) {
    alert(pid);
    var table = document.getElementById('&lt;%= gvResults_gov.ClientID %&gt;');
    rows = table.getElementsByTagName('tr');
    var i;
    var j;
    var cells;
    var customerId;
    for (i = 0, j = rows.length; i &lt; j; ++i) {
      cells = rows[i].getElementsByTagName('td');
      if (!cells.length) {
        continue;              }
        customerId = cells[0].innerHTML;
      }
      alert(customerId);
  }
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;table cellpadding="4" style="color: #333333; border-width: 0px; border-style: Groove;
      width: 100%; font-weight: bold; width: 100%;" id="MainContent_gvResults_gov"
      class="box-table-b"&gt;
      &lt;tbody&gt;
  
          &lt;tr &gt;
              &lt;td&gt;
                  &lt;input type="hidden" value="6532" id="MainContent_gvResults_gov_hdDocID_0" name="ctl00$MainContent$gvResults_gov$ctl02$hdTocID"&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  1010041215
              &lt;/td&gt;
  
          &lt;/tr&gt;
  
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>