Skip to main content
100%

Password Visibility

✓ Published0🌍 Public
Aangusgrant
Last edited Oct 10, 2022
Created on Oct 10, 2022

This example demonstrates a login form with a “Show password” checkbox that toggles the visibility of the password field. When checked, the password input’s type attribute changes from “password” to “text,” revealing the typed characters; unchecking restores the masked state. The interaction uses vanilla JavaScript and the `addEventListener` method on the checkbox’s `change` event, with `setAttribute` to update the input type. The page is plain HTML and CSS, with no external libraries or data sources.

AI-generated description

Similar vizzes