-3

How can I format my script and input to show only 10 numbers and have the characters of ( ) and + at the start of the number? Thanks.

sass
  • 87
  • 2
  • 13
  • use regular expression - https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions – Prisoner Apr 10 '14 at 09:40

1 Answers1

0

You can use a patern attribute something like:

<input type="phone" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" required="">
defau1t
  • 10,593
  • 2
  • 35
  • 47