JavaScript: The Definitive Guide, Sixth Editio javaScript权威指南(第6版) pdf 文字版-文字版, javascript电子书, 和javascript 有关的电子书:

15.3 Document Structure and Traversal

document.all[0] // The first element in the document document.all["navbar"] // Element (or elements) with id or name "navbar" document.all.navbar // Ditto document.all.tags("div") // All
elements in the document document.all.tags("p")[0] // The first

in the document

15.3 Document Structure and Traversal

Once you have selected an Element from a Document, you sometimes need to find structurally related portions (parent, siblings, children) of the document. A Document can be conceptualized as a tree of Node objects, as illustrated in Figure 15-1 . The Node type defines properties for traversing such a tree, which we’ll cover in §15.3.1 . Another API allows documents to be traversed as trees of Element objects. §15.3.2 covers this newer (and often easier-to-use) API.

欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/27717.html
友情链接It题库(ittiku.com)| 版权归yishouce.com所有| 友链等可联系 admin#yishouce.com|粤ICP备16001685号-1