Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .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 23:43pm
Edited 11-Sep-12 23: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)



Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2015
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