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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:24:48+00:00 2026-05-26T03:24:48+00:00

I am creating a form with one field to input numbers . How can

  • 0

I am creating a form with one field to input numbers . How can I show the value of the numbers in text format in the below text field ?

Eg: If I enter the number 2000 in the text field , the number is displayed below in words (“Two Thousand”).

  • 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-26T03:24:49+00:00Added an answer on May 26, 2026 at 3:24 am

    here you are

    function readable_number(num){
        var bits_a = ["thousand", "million", "billion", "trillion", "zillion"];
        var bits_b = ["ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", "eighty", "ninety"];
        var bits_c = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"];
    
        if (num==0){return 'zero';}
    
        var result = (num<0)?'minus ':'';
    
        num = Math.abs(num);
        for(var i=bits_a.lenght; i>0; i--){
            var p = pow(1000, i);
            if (num > p){
                var b = Math.floor(num/p);
                num -= p * b;
                result += readable_number(b) + ' ' + bits_a[i-1];
                result += ((num)?', ':'');
            }
        }
        if (num > 100){
            var b = Math.floor(num/100);
            num -= 100 * b;
            result += readable_number(b) + ' hundred' + ((num)?' and ':' ');
        }
        if (num >= 20){
            var b = Math.floor(num/10);
            num -= 10 * b;
            result += bits_b[b-1] + ' ';
        }
        if (num){
            result += bits_c[num-1];
        }
        return result;
    }
    
    alert(readable_number(1234));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When creating a form, I wish to use one field on the model as
How would one go about creating a custom form field type for Symfony 2?
In one form I am creating a territory and editing multiple users. The "user_attributes"
I'm creating an implementation that performs conversion from one form to another. The design
Hello I am creating a simple form to enter employee information. An employee has
In a custom Form, how does one validate a Model's field's uniqueness (i.e., has
I'm creating a form in CodeIgniter that has a paired value- Companies, and CEOs.
I'm creating a form in a Rails 3 app that has a dropdown field.
I'm creating a big form with a lot of input fields. To make things
I am creating a form in an ASP.NET MVC 3 view, in which one

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.