Password defaultValue property
The Password objectDefinitions and usages
The defaultValue property sets or returns the default value for the password domain.
Note: This default value is the default value specified in the HTML "value" property.
Grammar
Set the defaultValue property:
Returns the defaultValue property:
Browser support
The defaultValue property is supported by all major browsers
Here's an example to get the default value for a password domain:
<html>
<head>
<meta charset="utf-8">
<script>
function displayResult(){
var x=document.getElementById("pwd").defaultValue;
alert(x);
}
</script>
</head>
<body>
<form>
Password: slt;input type-"password" id="pwd" value="thgrt456";"
</form>
"button" onclick" "displayResult()"
</body>
</html>
Try it out . . .
The Password object