jQuery vs document.querySelectorAll

后端 未结 12 1104
闹比i
闹比i 2020-11-28 01:28

I heard several times that jQuery\'s strongest asset is the way it queries and manipulates elements in the DOM: you can use CSS queries to create complex queries that would

12条回答
  •  没有蜡笔的小新
    2020-11-28 01:50

    $("#id") vs document.querySelectorAll("#id")

    The deal is with the $() function it makes an array and then breaks it up for you but with document.querySelectorAll() it makes an array and you have to break it up.

提交回复
热议问题