I have a form with many input
$("input[name='firstname']")
Return
Object { 0: input.form-control, 1: input.form-control, 2: input.form-control, 3: input.form-control, length: 4, prevObject: {…} }
I search to set a value to the input, so I tried
$("input[name='firstname']")[0].val=12;
$("input[name='firstname']")[0].text=12;
I don't see the value in the input.
So I tried
$("input[name='firstname']")[0].val("12");
Uncaught TypeError: $(...)[0].val is not a function