This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Number formatting problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Number formatting problem" Watch "Number formatting problem" New topic
Author

Number formatting problem

Shashidahanu Iyyanar
Ranch Hand

Joined: Jun 22, 2005
Posts: 37
Hi All,
I have a textfield which should accept the input in the following formats:1234.45 or 123.45 or 1.45.There should be only 2 digits after the decimal point and 4 and less than 4 digits before the decimal point.How is this possible in Javascript?A example would be much better.Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Number formatting problem
 
Similar Threads
how to use regular expression in schema
Intance methods
char range
How to count the number of digits after decimal point in java?