style.item() (Method)

When the style is treated as if it were a collection, objects belonging to it can be referenced by their item numbers.


JScript - 3.0
Internet Explorer - 4.0
Property/method value type:style object
JavaScript syntax:IEmyStyle.item(anIndex)
IEmyStyle.item(aSelector, anIndex)
Argument list:anIndexA zero based value in accordance with the length attribute of the style object.
aSelectorA textual value that selects all matching objects

You will have to use some JavaScript to inspect the values presented by this mechanism. The following lines both yield a FONT-SIZE object:



The style object in both cases only has a single item in its collection and so the length values for these expressions always yield 1 for a simple document:



If you begin to explore the MSIE browser in this way, there are many undocumented properties and object references which are reasonably easy to figure out because of their names. However some are quite obscure. We have tried to cover as many as we can. Discovering undocumented method calls is far more difficult and you may need to reverse engineer the JScript interpreter to discover the names of the methods that are implemented.

See also:Collection.Item()