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 8219353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:07:45+00:00 2026-06-07T13:07:45+00:00

I implemented iphone&android app in jQuery mobile.* i used **pure jQuery mobile To enter

  • 0

I implemented iphone&android app in jQuery mobile.* i used **pure jQuery mobile

To enter phone `number in a text box. I used TYPE=”TEL”’ this is for numaric keypad.

<input type="tel" style=" width:81%;" id="contactNumber" value="" class="ui-input-text ui-body-c ui-corner-all ui-shadow-inset" /> 

But user can enter text also the text box which is unnecessary thing.

How can I prevent user from inserting characters other than numbers?

For mobile devices users it would be much more comfortable if the only input possibile is numeric, as they must press each button to get a number rather than a letter!

I tried adding TYPE=”TEL” TYPE=”mumber” in the input field, but it does not work to prevent.

  • 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-06-07T13:07:48+00:00Added an answer on June 7, 2026 at 1:07 pm
    $(document).ready(function() {
        $('#contactNumber').keyup(function() {
            var numbers = $(this).val();
            $(this).val(numbers.replace(/\D/, ''));
        });
    });
    

    This should replace any non-digit with an empty character *as they are put in, negating the need to search for more than one non-digit at a time.

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

Sidebar

Related Questions

I have implemented an app in iphone using sencha touch & phone gap .
I've implemented a simple app using a listview From jQuery-mobile, it appears as hyperlink
I've implemented a standard jQuery auto grow/expand textarea plugin into iPhone my web app
I have implemented a client-server transferring from Windows desktop application to iPhone App. I
I am planning to integrate Login With Facebook feature into my iPhone/Android App; and
I have implemented a WebApp using SplitView - http://asyraf9.github.com/jquery-mobile/ - (and that seems to
I've implemented AVAudioPlayer into my iPhone app but the audio being played is far
I've implemented an iPhone App that uses a RESTful HTTP POST to register itself
In my iPhone app I have implemented a custom tab bar which functions perfectly,
I am creating an ipad and iphone (Universal App). I have implemented Paypal in

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.