Hi,
User will be entering % data in textbox. I am now using filter textbox extender to allow only numbers and .(ie decimal values). I also want the user to enter values from say 1 to 100 only.. How can i do this? If user wants to enter 0.5%?
You want to allow decimals or not?
Yes i want to allow decimal values also
check this
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript"> function keyup(o) { if (parseFloat(o.value) > 100.0) { o.value = 100.0; } } </script> </head> <body> <form id="form1"> <input type="text" onkeyup="keyup(this)" /> </form> </body> </html>
Demo
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.