HTML DOM defaultValue Property
Complete Password Object Reference
Definition and Usage
The defaultValue property sets or returns the default value of a
password field.
Note: The default value is the value specified in the HTML "value"
attribute.
Syntax
passwordObject.defaultValue=somevalue
|
Example
The following example gets the default value of the password field:
<html>
<head>
<script type="text/javascript">
function alertValue()
{
alert(document.getElementById("password1").defaultValue)
}
</script>
</head>
<body>
<form>
<input type="password" id="password1" value="thgrt456" />
<input type="button" id="button1" onclick="alertValue()"
value="Show default value" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Get
the default value of a password field
Complete Password Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|