Skip to content

Instantly share code, notes, and snippets.

@bueltge
Created January 4, 2012 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bueltge/1559312 to your computer and use it in GitHub Desktop.
Save bueltge/1559312 to your computer and use it in GitHub Desktop.
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
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment