Phone number formatter | JavaScriptSource

Phone number formatter

Kyle Hayes Jun 27, 2005

This script will first eliminate all non-numeral values and check to see whether the value is a valid 10 digit long phone number. If it is, the number is formatted with the parenthesis and the dash and returns the value to the phone number textbox. If less than 10 numbers, a blank value is returned and an error message shows up.

Leave a Response

(0 comments)