Question
Create a set of HTML and JavaScript files , that will include a text box for user input that will say What's your age? There
Create a set of HTML and JavaScript files , that will include a text box for user input that will say "What's your age?"
There should be a button that says Enter on it. When the button is clicked, an evaluation should be done.
If value is (NaN), then you should display an alert box saying, Not a number. The same goes for when the user enters a 0 or a negative number. If the entry is valid, then you must appropriately test the input.
If the user entered:
A number that is greater than or equal to 5, then you should display a Sandwich picture
A number that is less than 5, then you should display the Milk picture
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