Password value Property
Password Object
Definition and Usage
The value property sets or returns the value of the value attribute of the password field.
For security reasons, some browsers may prevent JavaScript code from reading the value property.
Syntax
Set the value attribute:
passwordObject.value="
value
"
Return the value attribute:
passwordObject.value
Browser support





All major browsers support the value property.
Example
Example
The following example gets the default value of the password field:
Try it »
Password Object