get inner HTML content height with clientHeight - Javascript DOM

Javascript examples for DOM:Element clientHeight

Description

get inner HTML content height with clientHeight

Demo Code

ResultView the demo in separate window

<html lang="en">
   <head> 
      <style>

div{//from   w  w w.j  a v a2  s  .c om
   border:1px solid black;
}


      </style> 
   </head> 
   <body translate="no"> 
      <div>
         Content
      </div> 
      <div>
         Content <br/>
         Content
      </div>       
      <script>
      console.log(document.getElementsByTagName('div')[0].clientHeight);
      console.log(document.getElementsByTagName('div')[1].clientHeight)

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

Related Tutorials