1. pwd => first password field id
2. rpassword => retype password field id
3. notmatch=> where info will be displayed id
function check() {
var pwd = document.getElementById("pwd").value;
var rpassword = document.getElementById("rpassword").value;
if (pwd == rpassword) {
document.getElementById("notmatch").innerHTML = "";
} else {
document.getElementById("rpassword").value = "";
document.getElementById("notmatch").innerHTML = "Password don't match";
}
}
No comments:
Post a Comment