Question

In: Computer Science

Create a very simple temperature converter form having two text fields. The first one is where...

Create a very simple temperature converter form having two text fields. The first one is where the user will enter temperature. The second field is where the computed temperature value is displayed depending on the unit (F or C).use html and javascript

Solutions

Expert Solution

Answer

Here i am converting temperature in celsius to fahrenheit. Here is the html and javascript code to do the task

tempc.html

<html>
        <title>Temperature Converter</title>
        <head>
                
        </head>
        <body>
  <!-- Ask user for input in celsius , and pass the value to function, and write the result in second input field -->
         <label for="temp">temperature in celcious </label><br><input type="text" name="temp" id="a"><br>
         <label for="b">converted celcious into farenheit</label><br> <input type="text" name="far" id="b"><br>
  <button onclick="tempConverter(document.getElementById('a').value)">Convert</button>
  <script>
                        function tempConverter(temp)    
                        {
                                var inputC = document.getElementById("b"); 
                                inputC.value=(temp*(9/5))+32;
                                //temperature conversion
                        }
</script>
  </body>
</html>

output

The celsius can be converted into faranheit by using following equation.

Any doubt in the html script comment please

Thanks in advance


Related Solutions

Question 2: Create a very simple temperature converter form having two text fields. The first one...
Question 2: Create a very simple temperature converter form having two text fields. The first one is where the user will enter temperature. The second field is where the computed temperature value is displayed depending on the unit (F or C).
Create an HTML form with the following: 2 text input fields 1 text area 2 radio...
Create an HTML form with the following: 2 text input fields 1 text area 2 radio buttons or 3 checkboxes 1 button Include labels for fields
Using PHP and MySQL Create a simple web form with at least 5 fields Include validation...
Using PHP and MySQL Create a simple web form with at least 5 fields Include validation and error messages Create a MySQL Database Create a table to store submissions from the form Only insert new data into the database when all validation is passed Use PHP to create an HTML table showing all the content of the database   New submissions should appear in table
Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin...
Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin Newton Your program should take a character which represents the temperature to convert from and a value to be converted to using the following specification: C - Celsius K - Kelvin N - Newton In addition your program should take in the following character to exit the program: X - eXit the program The numeric input for your program should be of type double....
This is a very simple program that will ONLY print a heading and columns of text...
This is a very simple program that will ONLY print a heading and columns of text to emulate the following information: Sales This Month Admin Fee Commission Rate ---------------------------------------------- ---------------------------------------------- ---------------------------------------------- Less than $10,000 $150 5% $10,000 – 14,999 $150 10% $15,000 – 17,999 $150 12% $18,000 – 21,999 $200 15% $22,000 or more $200 16% ******Salesperson of the month****** Name: STUDENT NAME ID: STUDENT ID public class SalesResult { public static void main(String[] args) { System.out.println(); . . ....
Utilizing PHP and HTML code Create a form that has text inputs for two numbers and...
Utilizing PHP and HTML code Create a form that has text inputs for two numbers and a submit button. Submit the values to a program that calculates and displays the GCD of the two numbers. The greatest common divisor of two integers a and b is the largest integer that is a factor of both a and b. The GCD of any number and 1 is 1, and the GCD of any number and 0 is that number. For example:...
In linux , Using a simple text editor, create a text file with the following name...
In linux , Using a simple text editor, create a text file with the following name &quot;Test&quot; and content: GNU GENERAL PUBLIC LICENSE The GNU General Public License is a free, copy left license for the GNU General Public License is intended to guarantee your freedom to GNU General Public License for most of our software; it applies … 2-Write the command to create the text file. 3-Print the file permissions. 4-Create a directory named &quot;361&quot; 5-Copy file &quot;Test&quot; to...
You have a table called scholar where there are two fields id and create date. You...
You have a table called scholar where there are two fields id and create date. You want to create an ETL process that loads the data from scholar table into the big data platform. What are the different things that you will put on a requirement document for the developer to write code and implement the solution?
Im trying to get a GUI interface in java where there is four text fields for...
Im trying to get a GUI interface in java where there is four text fields for the first name, last name, department, and phone number of employee in a program. Then also have a radio button below for Gender (Male/Female/Other) and a list for the Title (Mr./Ms./Mrs./Dr./Col./Prof.). At the very bottom of the frame there has to be buttons for printing, submitting and exiting but for whatever reason when I tried it nothing appears in the frame regardless of what...
Is there a simple way to create a username and password for a registeration form? The...
Is there a simple way to create a username and password for a registeration form? The username should be between 4 and 20 characters. The password should be between 4 and 12 characters, contain at least one digit, and contain at least one uppercase and one lowercase character. Select four special characters and require that the password contain at least one of them.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT