Password.defaultValue

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+ Syntax

							password.defaultValue

Description

The defaultValue property of the Password object is used to get the HTML VALUE attribute of the password box.

Example

Listing 7.415 shows an example of how the defaultValue is used to get the password value.

Listing 7.415 Example of the defaultValue Property
<html>
<head>
<title> Example of the password defaultValue property</title>
</head>
<body>

<form name="form1">
<input type="PASSWORD" Name="pass" size=10 value="pass123">
<br>
<input type="BUTTON" value="Show Password"
onClick=alert(document.form1.pass.defaultValue)>
</form>

</body>
							
</html>
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.