<input type="password">
Browser |
|
---|---|
Type |
The INPUT element defines an input field. When you specify "password" for the type attribute of this element, a password text box is created.
The input text is displayed as asterisks or bullets.
<input type="password" name="pass1">
<input type="password" name="pass2" size="30" maxlength="30" value="Example">
Attribute | Value | Explanation |
---|---|---|
type=" " | password | the type of input field |
name=" " | field name | a unique name for the field |
size=" " | number of characters | the input field width |
maxlength=" " | number of characters | the maximum number |
value=" " | initial value | the text displayed in the field |
- type="password"
- Creates a password text box on the form.
- name=""
- The field name is used to identify the form field.
- size=""
- The input field width is specified by the number of characters.
- maxlength=""
- Specifies the maximum number of characters allowed in the input field.
- value=""
- Specifies the initial text displayed in the input field.