HTML DOM select() Method
Complete Password Object Reference
Definition and Usage
The select() method is used to select the text in a
password field.
Syntax
Example
The following example selects the text in a password field:
<html>
<head>
<script type="text/javascript">
function selText()
{
document.getElementById('password1').select()
}
</script>
</head>
<body>
<form>
<input type="password" id="password1" value="thgrt456" />
<input type="button" onclick="selText()" value="Select text" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Select
the text in a password field
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!
|
|