mardi 17 mai 2016

Use a pattern to format value in input of type Number

I'm trying to format the value of my input using html5

I want as minimum value 001 , and as maximum value 999. When i type 1 i need the value to be translate in 001. And 10 in 010.

I have to fix the number of digits to 3. That's the same effect that "%03d"

I have checked on internet and find that solution was probably a pattern for my input but after a lot of try, i'm still stuck.

Any ideas ? Forgive me for my english, it's far to be perfect, hope you can understand me :D

Aucun commentaire:

Enregistrer un commentaire