Mega Code Archive

 
Categories / JavaScript Tutorial / Form
 

Password defaultValue

The defaultValue gets the HTML VALUE attribute of the password box. <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>