You are here: irt.org | FAQ | HTML | Q2070 [ previous next ]
Add the command MAXLENGTH="-" inside the text box command.
The following was submitted by Sunita Mulay
By giving the value to the maxlength attribute of the textbox. This attribute allows you to give a numeric value that specifies the limit of characters. You can also give a specific size to the textbox.
<html> <head> <title>Limit the amount of characters ! </title> </head> <body> <!-- this textbox will take unlimited no of characters --> <input type="text" name="" value=""> <br> <!-- This textbox will take only "10" characters --> <input type="text" name="" value="" maxlength="10"> <br> <!--This textbox will take 10 characters and the size of the textbox is also same. --> <input type="text" name="" value="" maxlength="10" size="10"> </body> </html>