getelementsbytagname

getelementsbytagnamegetelementsbytagname
  1. Then , it finds all the command arguments using getElementsByTagName .

    然后,它使用getElementsByTagName寻找所有命令参数。

  2. In addition , it uses getElementsByTagName to access all the tags .

    此外,它还使用getElementsByTagName访问所有的标记。

  3. The problem is that getElementsByTagName recursively traverses the document , returning all matching nodes .

    问题在于getElementsByTagName递归地遍历文档,从而返回所有匹配的节点。

  4. The getElementsByTagName () function returns a new instance of class DOMNodeList containing the elements with a given tag name .

    getElementsByTagName()函数返回类DOMNodeList的一个新实例,包含使用给定标记名的元素。

  5. The getElementsByTagName () method searches within the node for elements with the corresponding name and returns them in a NodeList object .

    getElementsByTagName()方法根据相应的名称在节点中搜索对应的元素,并通过NodeList对象返回它们。

  6. If you were to call getElementsByTagName searching for customer names and ended up with product and company names , your program will likely misbehave .

    如果要调用getElementsByTagName搜索客户名称,结果却得到产品和公司名称,您的程序可能会出现错误行为。

  7. You remove the Item at index ( cnt-1 ), since your array of elements ( obtained by calling getElementsByTagName (" Item ")) is0-indexed .

    删除index(cnt-1)处的Item,因为您的元素数组(调用getElementsByTagName(“Item”)获得)是0-indexed。

  8. Next , the document returned by the DOM tree is parsed using the getElementsByTagName to look for the Results tag , and then it looks for the first contact tag .

    接下来,该函数使用getElementsByTagName解析DOM树返回的文档,以查找Results标记,然后查找第一个contact标记。