24.09.2026
This commit is contained in:
@@ -13,38 +13,17 @@
|
||||
<input type="text" name="userName" id="username" placeholder="Jonny">
|
||||
<br><br>
|
||||
<label for="password">Passwort</label>
|
||||
<input type="password" id="togglePasswordBtn" name="passWord" placeholder="Password"><br><br>
|
||||
<div>
|
||||
<input type="password" id="togglePasswordBtn" class="passField" name="passWord" placeholder="Password">
|
||||
<button class="icon"> 👁 </button><br><br>
|
||||
</div>
|
||||
<button id="togglePasswordBtn" onclick="togglePassword()">Passwort anzeigen/ausblenden</button><br>
|
||||
<button id="togglePasswordBtn2">Passwort anzeigen/ausblenden</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function togglePassword(){
|
||||
var passwordField = document.getElementById("togglePasswordBtn");
|
||||
|
||||
if(passwordField.type === 'password'){
|
||||
passwordField.type = 'text';
|
||||
}
|
||||
else if(passwordField.type === 'text'){
|
||||
passwordField.type = 'password';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
document.getElementById('togglePasswordBtn2').addEventListener('click', function() {
|
||||
var passwordField2 = document.getElementById("togglePasswordBtn");
|
||||
|
||||
if(passwordField2.type === 'password'){
|
||||
passwordField2.type = 'text';
|
||||
}
|
||||
else if(passwordField2.type === 'text'){
|
||||
passwordField2.type = 'password';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script src="assets/js/scripts.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user