Question
** Urgent Help Needed ** Hi, Im working with HTML, CSS & JavaScript to do a form validation but Im running into some problems and
**Urgent Help Needed**
Hi, Im working with HTML, CSS & JavaScript to do a form validation but Im running into some problems and really need your help, please!
My form should have these inputs: First Name, Last Name, and Age (21 & over). The submit button should be in the center. A graphic at the top.
I should use JavaScript to provide the user with some feedback on the values they enter. So, the message should show up as soon as the person starts typing and say, for example, Your name should contain at least 5 characters. This error message should disappear once the user types the right characters/number(age).
My teacher says, "To do this you will need to create a function that has an event listener on each of your inputs. (this is needed to get full points)
The Event listener should call a function that evaluates the inputs value(what the user inputs). *HINT* use this.value as it will refer to the triggering element (the input). (this is needed to get full points)
This function should take the value and use a conditional statement (if/else or switch) and provide the user with an error message depending on the value (please make the error message be below the input and in red)."
I don't understand how to apply these and create a functional form.
How can I do this please?
My CSS and JS file should be external.
Thank you so much!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started