Javascript Reference
Categories: document

javascript document doctype

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


Returns a reference to the DOCTYPE element object (the same as the W3C DOM abstract DocumentType node object). The property returns a reference value only if the DOCTYPE is specified in the document; otherwise the property returns null. As of Version 6, IE for Windows does not implement this property or node type. See the DocumentType object for properties available in various browsers. In a pure W3C DOM environment, the doctype property is inherited from the core document object, and is thus available to XML documents, as well.

var docsType = document.doctype;

Node reference.



Powered by Linode.