Javascript ITL 23092026
This commit is contained in:
@@ -33,6 +33,11 @@
|
||||
var myVariable = 1;
|
||||
let myVariable = 1;
|
||||
|
||||
snake_case --> number_of_snakes
|
||||
Kebab-case --> number-of-kebabs
|
||||
|
||||
camelCase --> firstNumber
|
||||
PascalCase -->
|
||||
|
||||
*/
|
||||
|
||||
@@ -42,6 +47,8 @@
|
||||
|
||||
firstNumber = "kickboxen";
|
||||
console.log(firstNumber);
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Second Javascript</title>
|
||||
<link rel="stylesheet" href="assets/css/02.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h2>Login</h2>
|
||||
<label for="username">Benutzername</label>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 20px;
|
||||
}
|
||||
.container {
|
||||
max-width: 300px;
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 8px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
input[type="text"], input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin: 8px 0;
|
||||
display: inline-block;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
button {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin: 8px ;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
+42
-1
@@ -1 +1,42 @@
|
||||
currently leer
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Javascript Grundlagen</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row g-3">
|
||||
<div class="col mb">
|
||||
asdasd
|
||||
</div>
|
||||
|
||||
<div class="col mb">
|
||||
asddsa
|
||||
</div>
|
||||
|
||||
<div class="col mb">
|
||||
asdsda
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="" async defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user