儿童和后代 [英] Children and descendents
本文介绍了儿童和后代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用Tree Walker,我想导航到网页中的每个元素.能否获得帮助,如何获取网页的所有子项和兄弟姐妹?如何循环功能.
Using Tree Walker I want to navigate to every element in a Webpage.Can I get help , how to get all the children and siblings of a webpage.How to loop a function.
推荐答案
你好,
从概念上讲, 请参阅这篇文章.本文不是关于遍历 DOM ,但涉及要使用的概念.通常,当开发人员想要遍历DOM时,它是在Web浏览器开发人员工具中完成的,而不是根据请求编写代码.如果不使用递归,根据网页的不同,情况可能会变得非常复杂.
Conceptually speaking, see this article. The article is not about traversing the DOM but about a concept to use. Generally when a developer wants to traverse the DOM it's done in a web browser developer tool rather than write code as request. Depending on the web page this can get very complicated without the use of recursion.
这篇关于儿童和后代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文