var inputs_text = document.querySelectorAll("input[type=text]"); //or just the first found var input_text = document.querySelector("input[type=text]");