JAVASCRIPT ASSIGNMENT Purpose of the assignment To apply simple JavaScript concepts to create a Fahrenheit to Celsius conversion program. Whats required of you. Having looked
JAVASCRIPT ASSIGNMENT
Purpose of the assignment
To apply simple JavaScript concepts to create a Fahrenheit to Celsius conversion program.
Whats required of you.
Having looked at some basic examples of JavaScript on http://www.w3schools.com and at the simple math with forms and validation example in detail which appears below this assignment. I would like you to now apply those concepts to create a simple page that lets users type in some temperature value in the Fahrenheit scale and when the user clicks a Show results button, to show the temperature in Celsius scale. For example, if the user types in 32, your results should show 0 degree Celsius.
Functionality
At the least, your program should allow for the following
User Input: One text field where the user will type in the temperature in Fahrenheit
Input Validation: When the Show results button is clicked, your program should check to see if the user has left the text field empty and also if what the user typed is a number and not anything else.
If there are problems (as in II. above) then your program should show appropriate error messages
Display results: If there are no errors and user input is valid, then your program should show the results to the user.
Note: The temperature conversion function is C = (F-32)*(5/9)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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