0

I was wondering if there's a difference between the 2 options, knowing all my div's are with id's?
I took them all with querySelector... is it better to change to getElementById or is it equivalent?

document.querySelector("#div").value;

OR

document.getElementById("div").value;
gr3g
  • 2,866
  • 5
  • 28
  • 52

0 Answers0