Input Password type Attribute
Definition and Usage
type
The attribute returns what type of form element the password field is.
For the password field, this attribute will always return "password
".
Example
Find out which type of form element the password field belongs to:
var x = document.getElementById("myPsw").type;
Syntax
passwordObject.type
Technical Details
Return value: | String value, the form element type of the password field. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |