Order of the elements returned using getElementsByTagName ()

后端 未结 1 2010
难免孤独
难免孤独 2021-02-18 23:21

Reading the controls using getElementsByTagName is very common practice to read the element. However I would like to know that whether we can trust the order in whi

相关标签:
1条回答
  • 2021-02-19 00:24

    This function always return elements in the same depth-first order.
    This is the order, in which they appear in HTML tree structure.

    0 讨论(0)
提交回复
热议问题