(This is not a duplicate. I can't find the solution in the link provided).
Say I have an input from a user in an html form intended as a serial number or some such. This number can start with 0s. Example, 0001.
In Javascript, if that number (0001) is incremented, it becomes 2.
I would like to preserve the leading 0s to get 0002.
How do I do that in Javasript?
Thanks in anticipation.