1234567891011121314151617181920 |
- let LogIn = document.querySelector("#LogIn");
- let Password = document.querySelector("#Password");
- let Button = document.querySelector("button");
- if (Button) {
- Button.onclick = function () {
- if (LogIn && Password) {
- Sender.Go(postLogin, "/login", { Login: LogIn.value, Password: Password.value });
- }
- };
- }
- function postLogin(answer) {
- if (answer.Result && answer.Result == true) {
- alert("Привет, " + answer.Name);
- location.href = "/";
- } else {
- Notify.Show("Неверный логин/пароль");
- }
- }
|