title: Getting value of <td> according to checked checkbox
body: <p>I need to get value of  according to checked checkbox... using <strong>HTML and jQuery or Javascript</strong> I have tried following code:</p>
  
  <p><strong>jQuery code:</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function () {
      $('input:not(#submit)').click(function () {
          t = $(this).attr('id');
  
          text = $('.time' + t).text();
          //alert(text);
      });
  
      $('#submit').click(function (e) {
          e.preventDefault();
          var trs = $('table tr');
          var values = trs.first().find('td');
  
          var values1 = $('table tr td :checkbox:checked').map(function () {
              return $(this).closest('tr').find('td').text() + "==&gt;"
              + values.eq($(this).parent().index()).text();
          }).get();
  
          alert(values1);
  
      });    
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>HTML markup:</strong></p>
  
  <pre><code>&lt;body&gt;
  &lt;table border="1"&gt;
  &lt;tr&gt;
          &lt;td&gt;No&lt;/td&gt;
          &lt;td &gt;Name&lt;/td&gt;
          &lt;td &gt;City&lt;/td&gt;
          &lt;td &gt;Check&lt;/td&gt;
  
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;1&lt;/td&gt;
          &lt;td&gt;
              select&lt;/td&gt;
              &lt;td&gt;
              select&lt;/td&gt;
          &lt;td&gt;
              &lt;input type="checkbox" name="checkbox" class="r1" /&gt;select&lt;/td&gt;  
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2&lt;/td&gt;
          &lt;td&gt;
              select&lt;/td&gt;
              &lt;td&gt;
              select&lt;/td&gt;
          &lt;td&gt;
              &lt;input type="checkbox" name="checkbox" class="r1" /&gt;select&lt;/td&gt;
  
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;3&lt;/td&gt;
          &lt;td&gt;
              select&lt;/td&gt;
              &lt;td&gt;
              select&lt;/td&gt;
          &lt;td&gt;
              &lt;input type="checkbox" name="checkbox" class="r1" /&gt;select&lt;/td&gt;
  
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;4&lt;/td&gt;
          &lt;td&gt;
              select&lt;/td&gt;
              &lt;td&gt;
              select&lt;/td&gt;
          &lt;td&gt;
              &lt;input type="checkbox" name="checkbox" class="r1" /&gt;select&lt;/td&gt;
  
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;input type="submit" name="submit" id="submit" value="Save time sheet" /&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>I need to get value of <code>&lt;td&gt;</code> of any row which checkbox is checked and I require multiple values also if multiple checkboxes are checked...</p>