Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 622897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:02:03+00:00 2026-05-13T19:02:03+00:00

I want some type of javascript to do like below I have a text

  • 0

I want some type of javascript to do like below

I have a text box to enter phone number

And its like this 111-111-1111

when a user start to type means when he types 111 then the “-” must come there automatically.

then again he types 111 “-” it should come automatically.

how can i do this???

please help

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:02:03+00:00Added an answer on May 13, 2026 at 7:02 pm

    With jQuery

    You could use the masked-input plugin for jQuery: http://digitalbush.com/projects/masked-input-plugin/ There’s a demo on that page demonstrating specifically the format you illustrated here.

    With MooTools

    There’s also the iMask solution which is built off of Mootools: http://zendold.lojcomm.com.br/imask/

    Without a Framework

    And dFilter for those not using any framework, preferring pure javascript: http://javascript.internet.com/forms/dfilter.html

    Else…

    If you’re looking for a more thorough solution that doesn’t require Mootools, jQuery, or some other framework, you might find Typecast to be of interest: http://typecast.arapehlivanian.com/index.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some specific id like 1,2,5,11,64589 in solr (int type) I want to
I have a javascript function like this: ScriptManager.RegisterClientScriptBlock(this, this.GetType(), watermark, function WaterMark(txtWaterMark, event, text)
I want to achieve something like this. http://jsfiddle.net/dpnay/ . A textarea with some text
I want user to type some text in JTextField and it must match some
I created a content type which has some fields and i want this fields
I want to define a ref type variable, like this: SomeType v=null; and this
I want some like this: How make it ideologically correct?
I have an object in Javascript that looks like this function MyObject(){ this.name=; this.id=0;
I have a form with some fields of type text and 2 fields (name
I have some JavaScript that on button click takes a the text from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.