Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Inputfelder optional zwischen type=text|password umschaltbar
<form method="post" action="">
<input type="password" id="my_password" name="password" value="" autocomplete="off" />
<input type="submit" value="Los" id="my_submit" disabled="disabled" onclick="document.getElementById('my_password').type = 'password'" />
<br />
<input type="checkbox" onchange="document.getElementById('my_password').type = this.checked ? 'text' : 'password';"> Passwort beim Tippen anzeigen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment