DHTML Object Properties DHTML Objects
Sets or retrieves the height of the object, in pixels.
HTML |
N/A |
Script |
object.style.pixelHeight [ = iHeight ] |
The property is read/write with no default value.
Setting this property changes the value of the height without changing the units designator. Unlike the height property, this property's value is an integer, not a string, and is always interpreted in pixels.
For more information on how to access the dimension and location of objects on the page through the document object model, see Measuring Element Dimension and Location.
In the following sample, the pixelHeight is incremented through use of a timer.
<script language="JavaScript">
function scaleThis ( ) {
if ( sphere.style.pixelWidth <900 ) {
sphere.style.pixelWidth += 4;
sphere.style.pixelHeight +=4;
window.setTimeout ( "scaleThis ( );", 1 );
}
}
</script>
This feature requires Microsoft® Internet Explorer® 4.0 or later.
Show me
posHeight