What is the difference between "Document" and "document" in JavaScript.
typeof document is object which we have been using regularly in our programming & typeof Document is function.
What is the use of Document function and where to use it?
What is the difference between "Document" and "document" in JavaScript.
typeof document is object which we have been using regularly in our programming & typeof Document is function.
What is the use of Document function and where to use it?
A Google search gave me these results:
The Document interface inherits from Node, and represents the whole document, such as an HTML page. Although the Document node is conceptually the root of a document, it isn't physically the root - the root node is the first Element node in the Document, and is represented by its documentElement property.
From: http://reference.sitepoint.com/javascript/Document
Both Document and HTMLDocument constructors are typically instantiated by the browser when you load an HTML document. However, using document.implementation.createHTMLDocument() its possible to create your own HTML document outside of the one currently loaded into the browser. In addtion to createHTMLDocument() its also possible to create a document object which has yet to be setup as an HTML document using createDocument(). Typically the use of theses methods are associated with programatically providing an HTML document to an iframe.
From: http://www.domenlightenment.com/#2
More info: