Availability: |
| ||||
JavaScript syntax: | N | myJSSTags = myDocument.classes.aClassName | |||
N | myJSSTags = myDocument.ids.anIdValue | ||||
Argument list: | aClassName | The name of a style class | |||
anIdValue | The value of an ID="..." HTML tag attribute | ||||
Object properties: | <tagName> |
This object is somewhat like an array in that it contains a collection of objects that can be accessed associatively by name. However, unlike an array, it does not respond to the length property request. Also unlike an array, you cannot access its members using index values.
The only meaningful property of this object is one of its array elements corresponding to an HTML tag name. There is one item in this collection for each HTML tag.
This is part of the deprecated JSS support in Netscape 4.0. It is not recommended that you use these facilities in new projects.
You cannot enumerate this object to inspect its properties.
The document.tags object has properties that correspond to each of the stylable tags - for example, there is a document.tags.P, document.tags.B and document.tags.H1 object.
Each of those objects has properties such as borderWidth and color so you can set or get the property value.
Note that the tags object properties can be specified in mixed case as it is case-insensitive. Its properties contain objects that correspond to HTML tags and therefore they also have case-insensitive properties that correspond to each tag's attributes.
It's an interesting way to control style from JavaScript, but since it was only ever supported in Netscape 4.0 and is no longer available in Netscape 6.0 (which fully supports CSS), there is no future for JSS.
This is sometimes called tags object but if you inspect the object with some script that reveals its constructor, you will see it is really a member of the JSSTags class.
Deprecated for any further use. This was available only in Netscape 4.0 and is completely removed from Netscape 6.0.
Property | JavaScript | JScript | N | IE | Opera | NES | ECMA | DOM | CSS | HTML | Notes |
---|---|---|---|---|---|---|---|---|---|---|---|
<tagName> | 1.2 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Prev | Home | Next |
JSSTag.width | Up | JSSTags.<tagName> |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |