mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-04 16:11:54 +00:00
This is often used on login forms, for example, to toggle the visibility of a password. The site will change the <input> element's type to "text" to allow the password to show.
7 lines
232 B
HTML
7 lines
232 B
HTML
<input type="password" value="hunter2" />
|
|
<script type="text/javascript">
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
let input = document.querySelector("input");
|
|
input.type = "text";
|
|
});
|
|
</script>
|