Grab a Client’s Attention: A Cool Little Javascript Number Input Box

A web application could contain equations and processes that Stephen Hawking himself would be proud of, but there’s one little feature I use in my work that always guarantees an instant reaction from users. Hell, I’m sure it’s even won me jobs before when showing it to potential clients.

“What is it?” I hear you cry. Try the demonstration below to see for yourself. Simply enter a number followed by one of the letters specified and you will see what happens:

As you will see, instead of having to manually enter and count the zeros, simply pressing the relevant letter will automatically format the number for you. Pretty cool huh? I’ve found this feature especially handy in the past when having to enter long numbers, for example property prices. I have included the code that is used in the demonstration below should you want to use this feature on your own website: