Password defaultValue Property
Password Object
Definition and Usage
The defaultValue property sets or returns the default value of the password field.
Note: This default value is the value specified in the HTML "value" attribute.
Syntax
Set the defaultValue property:
passwordObject.defaultValue="
value
"
Return the defaultValue property:
passwordObject.defaultValue
Browser support





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