Answers for "javascript phone number input"

0

javascript phone number input

function phonenumber(inputtxt)
{
  var phoneno = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
  if((inputtxt.value.match(phoneno))
        {
      return true;
        }
      else
        {
        alert("message");
        return false;
        }
}
Posted by: Guest on May-12-2020

Code answers related to "javascript phone number input"

Code answers related to "Javascript"

Browse Popular Code Answers by Language