Javascript Reference
Categories: DocumentType

javascript DocumentType Description

@March 15, 2008, 1:22 a.m.
DocumentTypeFirefox/Netscape/NN 6 IE 5(Mac) Chrome/Safari/DOM 1  


Reflects the DOCTYPE element, if one arrives to the browser as part of the document flow. The DocumentType object is its own node type in the W3C DOM, and, just as indicated in its position in a document's source code, exists outside of the content portion of the document tree. Access to this object in supported browsers is via the document.doctype property. If no DOCTYPE element exists in the file, the property returns null.


Properties of the DocumentType object expose individual pieces of the data within the DOCTYPE tag, whose structure is determined by SGML standards. The W3C DOM Level 2 specification provides placeholder properties for these pieces, and Netscape 6 implements most of them to one degree or other. But it is clear from the DOM specification that work on aligning the two worlds is not complete.

Object Model Reference
Object-Specific Properties
Object-Specific Methods


Object-Specific Event Handler Properties


Powered by Linode.