asp.net.ph

Skip Navigation Links

pixelHeight Property

DHTML Object Properties   DHTML Objects


Sets or retrieves the height of the object, in pixels.

Syntax


HTML N/A
Script object.style.pixelHeight [ = iHeight ]

Possible Values


iHeight Integer value.

The property is read/write with no default value.

Remarks

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.

Example

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 

See Also

posHeight



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note