How to use HTML DOM Password select in JavaScript
In this article I am going to explain about password select method in JavaScript.
HTML DOM password select method
The password object select method is used to select the content of a password field.
Syntax of password select method
Browser support
The password select method is supported in all major browser.
Example of password select method
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function PwdFunction() {
document.getElementById("password").select();
}
</script>
</head>
<body>
<form>
Password: <input type="password" id="password" value="dotnet123" />
</form>
<button type="button" onclick="PwdFunction()">Select Password</button>
</body>
</html>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here