Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- //confirm password match
- var new_password = document.getElementById("new_password")
- , confirm_password = document.getElementById("confirm_password");
- function validatePassword(){
- if(new_password.value != confirm_password.value) {
- confirm_password.setCustomValidity("Passwords Don't Match");
- } else {
- confirm_password.setCustomValidity('');
- }
- }
- new_password.onchange = validatePassword;
- confirm_password.onkeyup = validatePassword;
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement