<body> and <table> ) and provides functionality global to the document (such as obtaining the page's URL and creating new elements in the document). A document object can be obtained from various APIs:
document in document's scripts. (The same document can also be referred to as window.document.)contentDocument property.responseXML of an XMLHttpRequest object.ownerDocument property.Depending on the kind of the document (e.g. HTML or XML) different APIs may be available on the document object. This theoretical availability of APIs is usually described in terms of implementing interfaces defined in the relevant W3C DOM specifications:
Document and Node interfaces, meaning that the "core" properties and methods are available for all kinds of documents.HTMLDocument interface, which is a more specialized interface for dealing with HTML documents (e.g., document.cookie, document.alinkColor).Methods or properties listed here that are part of a more specialized interface have an asterisk (*) next to them and have additional information in the Availability column.
Note that some APIs listed below are not available in all browsers for various reasons:
Detailed browser compatibility tables are located at the pages describing each property or method.
| |
| |
| |
| |
| |