I am making a website and I want to use multiple inputs
<input type="text" class="foo" value="foo">
<input type="text" class="foo" value="foo">
<input type="text" class="foo" value="foo">
...
<button onclick="function()">Send</button>
In the Javascript I am using a querySelectorAll to get the values in a array
function function() {
document.querySelectorAll('.foo').value;
}
This only work for me when I don’t use a value but then I get the full element and not the value..
Thanks :)