jQuery :password selector
The :password selector in jQuery is used to select the input elements with type = "password".
The commonly used syntax of using the :password selector is given as follows -
Let's see an illustration to understand the working of the :password selector.
It is a simple example of using the :password selector. In this example, there are two input fields one is of type = "text", and the other one is of type = "password". On clicking the given button, the :password selector will select the input field with the type = "password".Test it Now
After the execution of the above code, the output will be -
On clicking the given button, the background-color of the password field will be changed as shown in the below screenshot -
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week