test2
This commit is contained in:
parent
d5d4935265
commit
5b09c43f16
21
test.html
21
test.html
@ -1,13 +1,16 @@
|
||||
<!DOCTYPE html><html><head><meta charset="utf-8"><title>Test</title></head><body>
|
||||
<form onsubmit="return doLogin(event)">
|
||||
<input id="em" placeholder="email"><input id="pw" type="password" placeholder="pass">
|
||||
<button type="submit">Войти</button>
|
||||
</form>
|
||||
<p id="out"></p>
|
||||
<p>Введите email и нажмите кнопку:</p>
|
||||
<input id="em" placeholder="curator@telecom.kz"><br><br>
|
||||
<button onclick="test()">Проверить вход</button>
|
||||
<p id="out" style="font-weight:bold;margin-top:16px"></p>
|
||||
<script>
|
||||
"use strict";
|
||||
var users={"curator@telecom.kz":{name:"Куратор"},"dpp@telecom.kz":{name:"ДПБ"}};
|
||||
function doLogin(e){e.preventDefault();var em=document.getElementById("em").value.trim().toLowerCase();if(users[em]){document.getElementById("out").textContent="OK: "+users[em].name}else{document.getElementById("out").textContent="FAIL"}return false}
|
||||
console.log("Test loaded");
|
||||
function test(){
|
||||
var em=document.getElementById("em").value.trim().toLowerCase();
|
||||
if(em==="curator@telecom.kz"||em==="dpp@telecom.kz"){
|
||||
document.getElementById("out").textContent="✅ Доступ разрешён: "+em;
|
||||
}else{
|
||||
document.getElementById("out").textContent="❌ Неизвестный email";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body></html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user