Assignment 6: Forms
The ‘maxlength’ attribute is used to limit the number of characters a user may enter into a text field. As an example, a text field that expects a year, may be limited to
<p> Birth Year: <input type="text" name="name" id="test-date" maxlength="4" /> </p>
Comments or Concerns:
NOTE: Type in the date box above. You will find (at least in most browsers) that you cannot type more than 4 characters.