-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsign_in.html
More file actions
41 lines (40 loc) · 1.15 KB
/
Copy pathsign_in.html
File metadata and controls
41 lines (40 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Войти</title>
</head>
<body>
<form id="sign">
<div>
<span id="loginShow">Введите логин и пароль для входа</span>
<div id="login">
<input type="text" id="username" placeholder="username">
<input type="password" id="password" placeholder="password">
<button id="authAction" onclick="sign_in()">Войти</button>
<div id="loginResult">
<!-- Тут мы будем отображать ответ сервера
'location.href="http://codehelper.ru/"'-->
</div>
</div>
</div>
</form>
<script>
//<----------sign_in--------------
//var signForm = document.getElementById("sign");
function sign_in(){
var login = document.getElementById('username').value;
var pass = document.getElementById('password').value;
console.log('login',login);
console.log('pass',pass);
if(login == 'admin' && pass == 'admin'){
alert('good!');
window.open("Firebase.html");
//window.location = "Firebase.html";
}else{
alert('Неверный логин или пароль!\nПовторите ввод!');
}
}
</script>
</body>
</html>