Setting the value in input type number

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.


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….


what do you mean?

I do not understand.

Your HTML has id=“apssnumber”.
Your Javascript is calling appsnumber.

apssnumber vs appsnumber.

They are not the same :wink: .

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 :slight_smile: . A second pair of eyes are invaluable!


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.