javascript - javascript中的文档与文档

标签 javascript

<分区>

JavaScript 中的 "Document""document" 有什么区别。

typeof document 是我们在编程中经常使用的对象,typeof Document 是函数。

Document函数有什么用,用在什么地方?

最佳答案

Google 搜索给了我这些结果:

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.

发件人: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.

发件人:http://www.domenlightenment.com/#2

更多信息:

关于javascript - javascript中的文档与文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21772453/

相关文章:

javascript - ES5 模块模式使用

javascript - jquery-ui 工具提示功能中的选项对工具提示没有任何影响

javascript - 在 Google Maps V3 中将 MapLabel 放置在多边形之上

javascript - 使用 for 循环用逗号分隔值填充选择元素

javascript - ObservableArray 抛出 undefined 不是 Knockoutjs 中的函数

javascript - xPages 从 CSJS 执行 SSJS

javascript - OpenLayers 3/Javascript : Why is there a "delay" when my array is filled?

javascript - 如何处理循环中的引用?

javascript - 当状态为 "paid"时禁用支付按钮

javascript - Ember.js - 在哪里放置下拉选项?