This post was originally published on attacomsian.com/blog.
The Document Object Model (DOM) is a programming interface for HTML and XML documen...
For further actions, you may consider blocking this person and/or reporting abuse
Another way:
const inputs = [...document.getElementById('signup').getElementsByTagName('input')];
// iterate over HTMLCollection
inputs.forEach(element => {
console.log(element);
});
Spread operator is very useful. Thank you for the tip 🙌
Clear explanations of DOM elements in JS...Thanks 😀
✌️
I swapped from getById/Classname to query selector a while ago. Do you know if Query selector is faster/more efficient? Thanks!