Explorar o código

как-то так

hi2all'git config --blobal user.email genanatarov@gmail.com@ %!s(int64=4) %!d(string=hai) anos
achega
4c3527aa47
Modificáronse 2 ficheiros con 98 adicións e 0 borrados
  1. 47 0
      js/01/css/style.css
  2. 51 0
      js/01/index.html

+ 47 - 0
js/01/css/style.css

@@ -0,0 +1,47 @@
+form {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    
+}
+.container {
+    width: 50%;
+    height: 100vh;
+    margin: 0 auto;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+}
+.red, .green {
+    width: 500px;
+    height: 200px;
+    
+}
+.green {
+    background-color: green;
+    display: none;
+    align-items: center;
+    justify-content: center;
+    text-align: center;
+    font-size: 50px;
+    text-transform: uppercase;
+}
+.green.active {
+    display: flex;
+}
+.red {
+    background-color: red;
+    display: none;
+    align-items: center;
+    justify-content: center;
+    text-align: center;
+    font-size: 70px;
+    text-transform: uppercase;
+}
+.red.active {
+    display: flex;
+}
+.suka {
+    color: red;
+}

+ 51 - 0
js/01/index.html

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link rel="stylesheet" href="css/style.css">
+    
+    <title>Document</title>
+</head>
+<body>
+    <div class="container">
+        <div class="green">congratulations</div>
+        <!-- <form> -->
+            <input type="text" placeholder="Login" id="login-name">
+            <input type="text" placeholder="Password" id="login-password">
+            <button>
+                submit
+            </button>
+            
+        <!-- </form> -->
+        <div class="red">failed</div>
+        
+    </div>
+    
+
+    <script>
+        
+        let login = {};
+            login.name = "admin"
+            login.password = "qwerty"       
+        let loginNameIn = document.querySelector("#login-name");
+        let loginPasswordIn = document.querySelector('#login-password');
+        let button = document.querySelector('button');
+        
+        button.onclick = function() {
+            let loginNameOut = loginNameIn.value;
+            let loginPasswordOut = loginPasswordIn.value;
+            if((login.name == loginNameOut) && (login.password == loginPasswordOut)) {
+                console.log('awd');
+            }else {
+                console.log('123');
+            }
+        }
+        
+        
+      
+    
+    </script>
+    
+</body>
+</html>