Answer the question
In order to leave comments, you need to log in
Pattern, pattern?
I am making a registration page. I came across the "Password Confirmation" field. Yuzayu script, it turns out to make this field. Here is the script:
function checkPP() {
if (document.getElementById('pass').value != document.getElementById('conf').value) {
alert ("Пароль и Подтверждение пароля не совпадают!")
}
else {
document.forms['forma'].submit();
}
}
Answer the question
In order to leave comments, you need to log in
function checkPP() {
if (document.getElementById('pass').value != document.getElementById('conf').value) {
alert ("Пароль и Подтверждение пароля не совпадают!")
}
else {
document.forms['forma'].submit();
}
}
function checkPP(e) {
if (document.getElementById('pass').value != document.getElementById('conf').value) {
alert ("Пароль и Подтверждение пароля не совпадают!")
e.preventDefault();
}
}
onclick="checkPP(event)"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question