I have an input of type number…
<input id="apssnumber" type="number" name="points" min="0" max="20" step="1" value="1">
What jquery method should I use to set the value of the above…I chose .val() but it did not have any effect.
$('input#appsnumber').val(20);
Did you try putting 20
in quotes?
<input id="apssnumber">
vs "input#appsnumber"
there’s clearly a name mismatch.
putting it in quotes did not work either….
$("#appsnumber").val('20');
Your HTML has id=“apssnumber”.
Your Javascript is calling appsnumber.
apssnumber vs appsnumber.
They are not the same .
you are absolutely right…sometimes I make such mistakes…and the problem is that they are hard to notice them.
And that’s ok! We all get tripped up sometimes . A second pair of eyes are invaluable!
2 Likes
system
Closed
9
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.