HTML DOM readOnly Property
Complete Password Object Reference
Definition and Usage
The readOnly property sets or returns whether or not a password field
should be read-only.
Syntax
passwordObject.readOnly=true|false
|
Example
The following example makes a password field read-only:
<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>
|
Try-It-Yourself Demos
Make a password field read-only
Complete Password Object Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|