Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1329 How do you have a user enter a password, then re-enter the password to be verified?

You are here: irt.org | FAQ | JavaScript | Password | Q1329 [ previous next ]

Try:

<form>
Enter Password: <input name="P1" type="password" value="">
Verify Password: <input name="P2" type="password" value="">
<input type="button"
onClick="if (this.form.P1.value != '' && this.form.P2.value != '' && this.form.P1.value ==
this.form.P2.value )
   alert('Passwords match');
   this.form.submit();
}
else {
   alert('Passwords do not match');
   this.form.P1.focus();
}">
</form>

Feedback on 'Q1329 How do you have a user enter a password, then re-enter the password to be verified?'

©2018 Martin Webb