|
1. height is a CSS attribute. It is a full dynamic attrubte, thus it must be previosely set to be retreived later.
Syntax
object.style.height (if locally set)
if embeded or external:
window.getComputedStyle(object,null).getPropertyValue(height) //for Moz
object.currentStyle[height]//if IE
2. offsetHeight is a readonly attrubte. It shows the height of an object event there was no previous dimension set up.
Syntax
object.offsetHeight
3. On the other hand height might be as well the HTML attribute. This case, the syntax is
object.getAttribute('height')
this is also a dynamic attribute. To manipulate it use setAttribute() method
object.setAttribute('height','400')
Last edited by Kor; 04-14-2005 at 11:31 AM..
|