Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

phone number with dashes

function addDashes(f)
{
    f_val = f.value.replace(/D[^.]/g, "");
    f.value = f_val.slice(0,3)+"-"+f_val.slice(3,6)+"-"+f_val.slice(6);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #phone #number #dashes
ADD COMMENT
Topic
Name
3+1 =