The <!DOCTYPE> tag at the top of the document is instantiated into a Doctype object and a reference to it is stored here. This tag describes a DTD statement that identifies the type of document.
Here is a properly formed DTD statement:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 FINAL//EN">
This is represented by an object whose type is a single exclamation mark. As this tag should be on the first line of a document, the object will be at index 0 in the document.all[] array.
Support for this is still somewhat patchy as of Netscape 6.0 and MSIE 5.5. Netscape 6.0 returns a DocType object (note the class name capitalization) but its string value is not defined. MSIE returns an undefined value.
There is apparently no access to this value in Netscape and MSIE only provides limited access.
See also: | ! object, !.tabIndex, Doctype object, Document object, Element object |
Prev | Home | Next |
Document.detachEvent() | Up | Document.documentElement |
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. |