The Password Widget
Behind the scenes, the above password field was created with the following HTML code
<FORM>
<INPUT TYPE = "PASSWORD"
NAME = "pass"
>
</FORM>
| It is important to know that this field does not offer any form of real security. The value typed in to the password widget is still sent over the internet as unencrypted plain text. The only security this widget offers is the security of preventing an office worker from looking over your shoulder. |
| Attribute | Description |
|---|---|
| TYPE | Specifies the type of interface widget. For a password widget, you use "PASSWORD" |
| NAME | Specifies the variable name associated with this widget |
| VALUE | Specifies initial default text which should appear in the password field |
| MAXLENGTH | Specifies the maximum number of characters allowed to be input into the widget |
| SIZE | Specifies the width of the field |
The VALUE Attribute
And here is the code which we used to make that password field.
<FORM>
<INPUT TYPE = "PASSWORD"
NAME = "password"
VALUE = "default text"
>
</FORM>
The MAXLENGTH Attribute
And here is the code which we used to make that password field.
<FORM>
<INPUT
TYPE = "PASSWORD"
NAME = "demo"
MAXLENGTH = "5"
>
</FORM>
The SIZE Attribute
And here is the code which we used to make the password fields.
<FORM>
<INPUT TYPE = "PASSWORD"
NAME = "demo"
SIZE = "30"
>
<INPUT TYPE = "PASSWORD"
NAME = "demo"
SIZE = "20"
>
</FORM>