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).
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....
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.
Create a Java Swing form that will have two Buttons: (1) the first linked to an...
Create a Java Swing form that will have two Buttons: (1) the first linked to an event handler to write data from two TextFields on the form to an output file; and (2) the other with an event handler to read data from the same file as input and write output to a binary ObjectOutputStream file.
In very simple cryptograph, the intended message sometimes consists of the first letterof very word in...
In very simple cryptograph, the intended message sometimes consists of the first letterof very word in upper case in a string. Write a function cryptmessage that will receive a string or a character vector with the message and return the encrypted message. >>messagestring=' the Early songbird tweets '; >>m=cryptmessage(messagestring) m=' TEST' Please put it in MATLAB
Create an example of a table that violates first normal form. Create an example of a...
Create an example of a table that violates first normal form. Create an example of a table that is in first normal form but violates second normal form. Create an example of a table that is in second normal form but violates third normal form. Please use own table or no plagiarism please.Thank you.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT