how to format textbox entry client side
Q:
I wanna to mask my textbox , so if the user enter the numbe开发者_如何学Gor one for example it formatted as
0000001 how to do this ,any number in 7 digits.
I think you are going to need something like this padding function.
You could listen for a keypress then as soon as it is fired, use getElementById()
to get your elements content, you could then run the padding function on it and put the padded value back in.
I think you need to use MaskedEditExtender in Ajax. Set its properties such as TargetControlID as your TextBox name, MaskType="Number", Mask="9999999" and AutoComplete="true". I hope it will work fine.
精彩评论