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