style.display (Property)

A control attribute that defines how an element should be rendered into the display window.

Availability:

CSS level - 1
DOM level - 2
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myStyle.display
CSS syntax:display: aType
Argument list:aTypeOne of the supported display types

This is currently implemented as a simple visibility switch. If the property is set to the value "none", then the object is hidden. To reveal the object again, set this property to its default value which is an empty string ("").

When the object is hidden, the surrounding objects close up the space. This means you cannot use the property to accomplish a blinking effect, because everything will dance around the screen as the object appears and disappears.

The full CSS specification for this property allows for it to control the display of an object as either an inline or block level element in the page.

The following keywords are defined for use with this property:

See also:JSSTag.display