I put MaxLength of text box is "10". After entering "." it is not allowing more than 2numbers. How to restrict it?. Ex:- 10.34, After than it is not allowing any letters.
Restrict MaxLength
Collapse
X
-
Tags: None
-
Welcome to TSDN!
Use onkeypress and check each key pressed. If the dot key has been pressed, check that only two more number keys are pressed. To prevent a key being entered, just return false as shown in the example on the linked page. -
-
-
I'm not sure I understand what you mean. If it doesn't allow already then there's no need to restrict the input.
By restricting, it would mean not allowing.
I think it'd be better if you post what code you have so far then we can work from there.Comment
Comment