Form data extracted

Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
This commit is contained in:
eoghanconlon73 2023-08-27 21:27:59 +01:00
parent 6ba509f8bd
commit 114ad8ea36

View file

@ -26,7 +26,9 @@
function formHandler(listener){
listener.preventDefault();
alert("Default skipped");
const formData = new FormData(formEl);
const object = { user: formData.get('user'), email: formData.get('mail')};
alert(JSON.stringify(object));
}
</script>
</body>