<div id='test'>Test</div> 2 3 <script> 4 var val=document.getElementById('test').offsetHeight; 5 alert(val); 6 </script>