How to use HTML DOM Password select in JavaScript

In this article I am going to explain about password select method in JavaScript.
  • 1579

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>



<script type="text/javascript">

    function PwdFunction() {







Password: <input type="password" id="password" value="dotnet123" />


<button type="button" onclick="PwdFunction()">Select Password</button>




select pass new meth.jpg

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


More Articles

© 2020 DotNetHeaven. All rights reserved.