I want to get height of an element with JavaScript, but I want the value even if it is applied in a <style>
tag, not just inline.
<style>
#test{height:100px;}
</style>
<div id="test"></div>
<script>
alert(document.getElementById("test").style.height);
<script>
The above alert
doesn't show anything because it just gets the inline style, not the entire style. How can I get to access to all the styles of an element?