JavaScript DHTML/Javascript Collections/tBodies

Материал из Web эксперт
Перейти к: навигация, поиск

"tBodies" Example

   <source lang="html4strict">
   

<html> <body>

<tbody>
   </tbody>
   <tbody>
   </tbody>
Row 1
Row 2
Row 3
Row 4
Row 5
Row 6

<button onclick="function1;">Get total number of tbody elements</button> <script language="JavaScript">

   function function1 {
       var m = document.getElementById("myTable").tBodies.length; 
       alert(m); 
   }

</script> </body> </html>


     </source>