Design comparison
Solution retrospective
It was my first time that I have tried to put aria-values that much. I think that i am starting to understand how this works.
What challenges did you encounter, and how did you overcome them?I am not sure that the code for evaluating validation of each input is the best. Also, I am not sure if the e.preventDefault() prevents the form from being rendered to the server or it is just prevents the page from reloading.
What specific areas of your project would you like help with?I would like to understand better the aria-attributes. More over I would like to understand better the functionality of the command e.preventDefault().
Community feedback
- @samuel-aduPosted 3 months ago
event.preventDefault()
event.preventDefault() is a method in JavaScript that prevents the default action associated with an event from occurring.
The default action when a form is submitted is for the browser to send the form data to the server and reload the page, to prevent the page from reloading we use the event.preventDefault() method.
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord