Password confirmation logic completed

Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
This commit is contained in:
eoghanconlon73 2023-08-27 16:35:52 +01:00
parent ff10493be9
commit 810a65e67c

View file

@ -26,7 +26,13 @@
function formHandler(listener){ function formHandler(listener){
listener.preventDefault(); listener.preventDefault();
alert("Default bypassed"); const formData = new FormData(formEl);
const pass = formData.get("password");
if(pass === formData.get("confirm")){
alert("Passwords match");
} else {
alert("Passwords don't match");
}
} }
</script> </script>
</body> </body>