1. <input id="pw" type="password">
  2. <button type="button" onclick="pw.type = pw.type === 'password' ? 'text' : 'password'">
  3. Anzeigen
  4. </button>