Question: I need help in the JAVASCRIPT portion Here is the HTML part: First Name Address City State Zip Code ********IN JAVASCRIPT********* Create a function that
I need help in the JAVASCRIPT portion
Here is the HTML part:
********IN JAVASCRIPT*********
Create a function that will validate form input
- Inside the function, create a variable to identify all the elements in the form
- Inside the function, create a variable called canSubmit, and set it to a boolean of true
- Inside the function, create a for loop that checks the value of each form field. If the form field is not completed, then canSubmit will be false
- In an event listener, add a method to prevent the default submission of the form
- Create an alert if the form is submitted that states a confirmation message
- Make sure this even listener contains code to reset the form
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
