+ 1
How to get a values from <input> tag?
2 ответов
+ 3
Usually like this e.g.:
let in = document.querySelector("input");
console.log(in.value);
Different input types have different values and attributes though. You can find them all on MDN if you want more detailed information :)
+ 3
You. can assign an id to the input, then do
document.getElementById(your id).value
to get the value.