Click here to Skip to main content
12,292,006 members (68,824 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: .NET .NET4
My problem is 18 digits before decimal point and 2 digits after decimal point should display in textbox.
using javascript
Posted 11-Sep-12 22:43pm
Edited 11-Sep-12 22:47pm
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Hi,

you can use the regular expression for match with exact scale and precision of the number entered in th textbox.

check these links.
checking for decimal numbers[^]
Simple regular expression for a decimal with a precision of 2?[^]
JavaScript Decimal Place Restriction With RegEx[^]

for more on regular expression refer below link.
http://www.regular-expressions.info/[^]

hope it helps.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160518.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100