Untitled
unknown
plain_text
8 days ago
649 B
2
Indexable
Never
const form = event.target; // Send the form data using fetch fetch(form.action, { method: 'POST', body: new FormData(form) }).then(function(response) { if (response.ok) { // Clear the form if the submission was successful form.reset(); alert('Registration successful!'); } else { alert('There was an error submitting the form.'); } }).catch(function(error) { alert('There was an error submitting the form.'); });
Leave a Comment