I have a textbox inside a project with HTML, Angular 2 and Typescript. How to accept only numbers and one dot OR one comma. It has to accept infinite numbers + dot OR comma + two numbers.
2.34 accept
1326262566.43 accept
4,08 accept
0,12 accept
45736573,98 accept
I can save it inside a String variable, doesn't need to be a number type.
Aucun commentaire:
Enregistrer un commentaire