123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <link rel="stylesheet" href="style.css" />
- <link rel="shortcut icon" href="img/icon.svg" type="image/svg">
- <title>Авторизация</title>
- <script src="main.js"></script>
- <script src="second.js"></script>
- <style>
- @import url('https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@400;500;600;700;800&display=swap');
- input[type="checkbox"] {
- display: none;
- }
- html {
- height: 100%;
- }
- body {
- background:
- url(img/pinkCircles.png) left bottom no-repeat,
- url(img/yellowCorner.png) right top no-repeat;
- margin-left: -10px;
- position:absolute;
- margin-right: 200px;
- position:absolute;
- }
- </style>
- </head>
- <body class="registration_form">
- <a href="main_unregistered.html"><input type="button" value="Отменить" class="button-back"></a>
- <p class="heads-form">Авторизация</p>
- <form class="form-position" name="form">
- <div class="element">
- <label class="lable">Почта</label><br>
- <input type="text" placeholder="User@mail.ru" class="input" tabIndex="1" onkeydown="return tab(this, event)" id="email">
- </div>
- <div class="element">
- <label class="lable">Пароль</label><br>
- <input type="password" placeholder="***********" class="input" tabIndex="2" id="password">
- </div>
- <label class="container">Запомните меня на этом компьютере
- <input type="checkbox">
- <span class="checkmark"></span>
- </label>
- <div class="button">
- <button onclick="fetchData()" class="button-text" id="avtoriz">Авторизоваться</button>
- <script>
- function fetchData(){
- // Make a GET request
- var emailInput = document.querySelector('input[id="email"]:valid');
- var passwordInput = document.querySelector('input[id="password"]:valid');
- if (emailInput.checkValidity() && passwordInput.checkValidity()) {
- var aurl = "https://iis.ngknn.ru/NGKNN/МамшеваЮС/12/api/User/Authorization?" + new URLSearchParams({
- Email: emailInput.value,
- Password: passwordInput.value
- });
- try {
- // Make a GET request
- let response = fetch(aurl);
- if (!response.ok) {
- throw new Error(`HTTP error! Status: ${response.status}`);
- }
- let data = response.json();
- console.log(data);
- } catch (e) {
- console.error('Fetch error: ' + e.message);
- }
- }
- }
- </script>
- </div>
- </form>
- <a href="registration_form.html" class="link"><p class="footer-form">Впервые у нас?</p></a>
- </body>
|