I have the field like below
input text is fixed to 11 digit.
Now When focus out I want the input text to be changed like below
123-456-789-01
how can I achive this using Jquery
can anyone guide me
I have the field like below
input text is fixed to 11 digit.
Now When focus out I want the input text to be changed like below
123-456-789-01
how can I achive this using Jquery
can anyone guide me
Copyright © 2021 Jogjafile Inc.

You can use regex below to format your phone
phone = phone.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1-$2-$3-$4");and setmaxlength=11