How to Accessing HTML Elements by type in JavaScript

Solution:


Accessing the input type Like  <input type=”text”> or type=”button” etc.

By writing this line of code you can select any input type.

document.querySelectorAll('input[type=text]')

Comments