网络 返回的节点列表;元素数组
Then, it finds all the command arguments using getElementsByTagName.
然后,它使用 getElementsByTagName 寻找所有命令参数。
The problem is that getElementsByTagName recursively traverses the document, returning all matching nodes.
getelementsbytagname递归地遍历文档,返回所有匹配的节点。
The getElementsByTagName() method searches within the node for elements with the corresponding name and returns them in a NodeList object.
getElementsByTagName() 方法根据相应的名称在节点中搜索对应的元素,并通过 NodeList 对象返回它们。
Finally, all of the functionality of the example in Listing 1 could have been implemented with a simple call to the getElementsByTagName function, had the original developer known about it.
最终,如果最初的开发者了解它的话,清单1中示例的所有功能应该可以通过利用对getelementsbytagname函数的简单调用实现。