"Lit the Candle"

Read only property of Input Password.

The Password object represents a password field in an HTML form.For each instance of an HTML <input type=”password”> tag on a form, a Password object is created.

“readOnlyproperty sets or returns whether or not a password field should be read-only.

Syntex : passwordObject.readOnly=true|false

<html>
<head>
<script type="text/javascript">
function makeReadOnly()
{
document.getElementById("password1").readOnly=true;
}
</script>
</head>
<body>
<form>
<input type=”password” id=”password1″ value=”thgrt456″ />
<input type=”button” onclick=”makeReadOnly()” value=”Make read-only” />
</form>

</body>
</html>

March 8, 2009 Posted by milansaha | javascript | | No Comments Yet