Availability: |
| ||||||
Inherits from: | Node object | ||||||
JavaScript syntax: | IE | myDoctype = myDocument.all.anElementID | |||||
IE | myDoctype = myDocument.all.tags("DOCTYPE")[anIndex] | ||||||
IE | myDoctype = myDocument.all[aName] | ||||||
- | myDoctype = myDocument.doctype | ||||||
- | myDoctype = myDocument.getElementById(anElementID) | ||||||
- | myDoctype = myDocument.getElementsByName(aName)[anIndex] | ||||||
- | myDoctype = myDocument.getElementsByTagName("DOCTYPE")[anIndex] | ||||||
HTML syntax: | <!DOCTYPE> | ||||||
Argument list: | anIndex | A reference to an element in a collection | |||||
aName | An associative array reference | ||||||
anElementID | The ID value of an Element object | ||||||
Object properties: | name | ||||||
Collections: | entities[], notations[] |
Every document should own a Doctype object according to the DOM level 1 specification. This object encapsulates name and some collections that describe the DTD. Work is still underway on standardizing the XML and DTD requirements and this object is therefore likely to change in later versions of the DOM specification.
The DOM level 2 specification adds the following new properties:
publicId
systemId
internalSubset
See also: | Document.doctype, Element.document, Notation object |
Property | JavaScript | JScript | N | IE | Opera | NES | ECMA | DOM | CSS | HTML | Notes |
---|---|---|---|---|---|---|---|---|---|---|---|
name | 1.5 ![]() | 5.5 ![]() | 6.0 ![]() | 5.5 ![]() | ![]() | ![]() | ![]() | 1 ![]() | ![]() | ![]() | ReadOnly |
Prev | Home | Next |
do ... while( ... ) | Up | Doctype.entities[] |
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. |