24.09.2026

This commit is contained in:
2026-09-24 16:39:31 +02:00
parent 50c6868dfe
commit 72df5857cb
7 changed files with 274 additions and 47 deletions
+5 -26
View File
@@ -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>
+32
View File
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<script>
function test(para1, para2){
document.write("Parameter 1 ist imt dem Wert: " + para1 + "<br />");
document.write("Parameter 2 ist imt dem Wert: " + para2 + "<br />");
for(var i = 2; i < arguments.length; i++)
{
document.write("Zusätzliche Paramter " + (i -1) + " mit dem Wert: " + arguments[i] + "<br />");
}
}
test(10,11,12,13,15,16,17,18,19,20);
</script>
</body>
</html>
+25 -1
View File
@@ -10,7 +10,7 @@ body {
border-radius: 8px;
background-color: #f9f9f9;
}
input[type="text"], input[type="password"] {
input[type="text"] {
width: 100%;
padding: 10px;
margin: 8px 0;
@@ -19,6 +19,8 @@ input[type="text"], input[type="password"] {
border-radius: 4px;
box-sizing: border-box;
}
button {
width: 100%;
padding: 10px;
@@ -31,4 +33,26 @@ button {
}
button:hover {
background-color: #45a049;
}
input[type="password"].passField {
width: calc(100% - 40px);
padding: 10px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button.icon {
width: 30px;
padding: 9px;
margin: 0px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
+23
View File
@@ -0,0 +1,23 @@
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';
}
});