Calling e.preventDefault() inside a form's submit handler:
- Resets the CSS
- Clears the form
- Validates the email
- Stops the browser from reloading the page / sending the form
Answer
D) Stops the browser from reloading the page / sending the form
preventDefault stops the default submit navigation so JavaScript can handle it.
Computer Science MCQ · More Lab: Mobile-Friendly Web Page MCQs · Practise