How to create a phone mask in pure js?

  • 0
    Good afternoon,
    Please tell me an example of an ALGORITHM to create a phone mask?
    It is possible only in words, it is possible with a code,
    but to understand the mechanics.
    Thank you.
    JavaScript Ivy Edwards, Mar 25, 2020

  • 2 Answers
  • 0
    in fact there is just work with regulars. google "input mask js codepen" and look for examples. for example:

    https://codepen.io/estelle/pen/LVQLRq
    Anonymous

  • 0
    I found solutions, but I don't understand the ALGORITHM itself.

    Unfortunately, in the title I cannot now clearly articulate what I want,

    as I am required to have a "question"

    and forbid the word "Prompt",

    so don't pay attention to the title,

    message only.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!