1

given that they are in the beginning in using the "html" interface and the Js language.... I'd have a little problem to solve..... I tried to take a look at the sequence of control characters (pattern), but I couldn't solve...... I would need to eliminate the initial "zero", in front of other possible numbers (only numbers, positives and decimals)..... (example: 045(no) ; 45(ok) ; 0450.85(no) ; 450.85(ok) ; 04500(no) ; 4500(ok).... Etc... inserting into an "inputBox" with type:"text".......Thank you..... Joseph.

0

1 Answer 1

1

You could parse the text into numbers, it will erase any useless padding. Then you transform back to a string.

Like this : const parser = input => Number(input).toString();

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.