I used jQuery and Javascript to create a script in which if two password type inputs don't match, it alerts, "password doesn't match." Here is my code:
if (!password == retypepassword) {
document.getElementById("retypepassworderror").innerHTML = "password doesn't match";
}
else {
$("#retypepassworderror").text("");
}
Note : both password
and retypepassword
are variables