www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] Javascript to check a number format

  1. #1
    Join Date
    Jan 2007
    Posts
    78

    resolved [RESOLVED] Javascript to check a number format

    I'm trying to make sure that an entry is formatted like 1 followed by 10 digits at least.
    I'm trying

    Code:
    if(f.match(/^\1\d{10,}$/)) {
    	document.getElementById("maindiv").style.display="block"}
    Why is this not working. How do I fix it.
    There is a warning saying NO SPACES OR DASHES etc..

    Thanks

  2. #2
    Join Date
    Jan 2007
    Posts
    78
    OOOPS!

    Solved it.
    if(f.match(/^1\d{10,}$/))

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles