Get HTMLElement from Element

前端 未结 4 776
孤街浪徒
孤街浪徒 2021-01-07 16:58

I have an Element, and I can not figure out how to get the HTMLElement from it.

For example:

A link         


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-07 17:32

    let nodes = document.querySelectorAll('a');
    // or
    let nodes = document.querySelectorAll('a');
    

提交回复
热议问题