<table id="myTable" cellpadding="0" cellspacing="0">
  <thead>
    <tr>
      <th>First Name</th>
      <th>Last Name</th>
      <th>Birth Date</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>John</td>
      <td>Smith</td>
      <td>03-11-1980</td>
    </tr>
  </tbody>
</table>
Solution:
$("#myTable tbody tr").length - Its wrong.
$("#myTable > tbody > tr").length; - Its right to get solution.
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Friday, 24 October 2014
How to get the number of rows in a table - tbodyin jquery?
Subscribe to:
Post Comments (Atom)
Feet/Inches to Meters Converter & Lbs to Kgs Converter
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
- 
<?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "HTML email"; $message = " <h...
 - 
document.onkeydown = myKeyDownHandler; function myKeyDownHandler(event){ alert(event.keyCode) }
 - 
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
 
No comments:
Post a Comment