Get <tr> element via getElementById - Javascript DOM

Javascript examples for DOM:Document getElementById

Description

Get <tr> element via getElementById

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <table> 
         <tbody>
            <tr id="bob"> 
            </tr> 
         </tbody>
      </table>   
      <script type="text/javascript">
console.log(document.getElementById('bob'))
console.log(document.getElementById('rose'))

      </script>  
   </body>//ww w .  jav  a  2s . c  o  m
</html>

Related Tutorials