Idocs Guide to HTML

Attribute for <INPUT ...>
MAXLENGTH = integer

MAXLENGTH sets the maximum number of characters for text or password fields.

<FORM ACTION="../cgi-bin/mycgi.pl">

account ID: <INPUT TYPE=TEXT NAME="accountID" MAXLENGTH=4><BR>
password:   <INPUT TYPE=PASSWORD NAME="password" MAXLENGTH=8>

<P><INPUT TYPE=SUBMIT VALUE="submit">
</FORM>

gives us this form:

account ID:
password:

Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.