Question: Lab 6 Introduction to Javascript Problem A: The first problem consists on developing a temperature conversion web page: 1 Add a simple text Temperature in

 Lab 6 Introduction to Javascript Problem A: The first problem consists
on developing a temperature conversion web page: 1 Add a simple text
"Temperature in Fahrenheit" and an input element with an id "trah_id" an

Lab 6 Introduction to Javascript Problem A: The first problem consists on developing a temperature conversion web page: 1 Add a simple text "Temperature in Fahrenheit" and an input element with an id "trah_id" an of type "text". Temperature in Fahrenheit: 2. Add a button with the following caption "Convert to Celsius. 3- Add a text "Temperature in Celsius:" and a paragraph that will display the result of the conversion and give it the id "Cel_id": Temperature in Celsius: 4. Write a Javascript function that converts a temperature from Fahrenheit (Df) to Celsius (De): Dc = (Df-32)*5/9 The function reads the input value that is inside the "Fah_id" input element than writes the result ir "Cel_id" paragraph. function convert(){ var ftemp = document.getElementById("tFah_id").value; var ctemp = (ftemp - 32)*5/9; document.getElementById( 'tcel_id").innerHTML = ctemp; ) 5- Now we need to link the function to the button:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!