Deltran
Programmer
- Mar 29, 2005
- 10
I feel bad for asking such a simple question... but I will anyway 
I'm having trouble finding the syntax to get the value of something from a style of a div, such as the height. The following is a snippit of what I have now:
<script>
...
var divHeight = document.getElementById(divBox).style.height;
...
</script>
<div id="divBox" style="width:100;height:100">
Hi! I'm a box, and I love you!
</div>
How would I get the height of the div? Any adivce would be welcome. Thx for taking the time to read this.
I'm having trouble finding the syntax to get the value of something from a style of a div, such as the height. The following is a snippit of what I have now:
<script>
...
var divHeight = document.getElementById(divBox).style.height;
...
</script>
<div id="divBox" style="width:100;height:100">
Hi! I'm a box, and I love you!
</div>
How would I get the height of the div? Any adivce would be welcome. Thx for taking the time to read this.