2
Guys, I created a form and a field for the user to fill in your phone. That is: type="tel". What I want is a Javascript code that, when the user enters the phone, the code automatically transforms the phone to this format (xx) xxxx-xxxx. In short: I want the code to automatically fill in the parentheses, the space and the hyphen, leaving the phone like this:
(xx) xxxx-xxxx
Obs: respecting parentheses, space and hyphen.
Another question: you can do this with HTML itself?
If you can, post the HTML part where I call the method, because I haven’t studied Javascript yet. Thank you.
What do these two mean "" ?
– Martha Maria Moreno
Keep in mind that the question speaks in mask specifically and not validation.
– Isac
Martha, in regular expression parentheses are used in syntax, "(" is to be interpreted as a common character.
– Giovanni Nunes