validationLogin.js
דף זה הוא מסוג Javascript ומטרתו לבצע בדיקות תקינות לטופס הכניסה.user_2706180
javascript
a year ago
729 B
6
Indexable
function validateLogin() {
var res = true;
res = username() && res;
res = password() && res;
return res;
}
function username() {
const username = document.getElementById("Username").value;
const usernameError = document.getElementById("Username_ErrorMSG");
if (username == "") {
usernameError.innerHTML = "Enter a Username!";
return false;
}
return true;
}
function password() {
const password = document.getElementById("Password").value;
const passwordError = document.getElementById("Password_ErrorMSG");
if (password == "") {
passwordError.innerHTML = "Enter a Password!";
return false;
}
return true;
}Editor is loading...
Leave a Comment