Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem A: using tryit The first problem consists on developing a temperature conversion web page: 1- Add a simple text Temperature in Fahrenheit: and an

image text in transcribedimage text in transcribed

Problem A: using tryit

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 tFah_id and

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 tCel_id:

Temperature in Celsius:

4- Write a Javascript function that converts a temperature from Fahrenheit (Df) to Celsius (Dc):

Dc = (Df 32)*5/9

The function reads the input value that is inside the tFah_id input element than writes the result in the

tCel_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:

6- Execute the web page and try entering numbers than retry using words. What is the

result in this last case?

Problem B

Lets consider the following table representing a students courses schedule:

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 "tCel_id": Temperature in Celsius: 4- Write a Javascript function that converts a temperature from Fahrenheit (Df) to Celsius (Dc): Dc = (Df - 32)* 5/9 The function reads the input value that is inside the "tFah_id" input element than writes the result in the "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:
Sunday Monday Tueday Wednesday Thursday
08-10
13-15
1. We have two arrays with the data that needs to be inserted into the table: morning = [ "Math", "Physics", "Math", "Science", "Programming"]; afternoon = ["Programming", "Databases", "Web Development", "Networks", "Sport"]; Write the Javascript function that will insert the data into the table to obtain the result below: Sunday Monday Tueday Wednesday Thursday 08-10 Math Physics Math Science Programming 13-15 Programming Databases Web Development Networks Sport Note that to modify the HTML code of the cell number 1 of the row number j of a table, you can write: table.rows[j].cells[i].innerHTML = "New Content"; 2- Using Javascript, add the following style to your table: Sunday Monday Tueday Wednesday Thursday 08-10 Math Physics Math Science Programming 13-15 Programming Databases Web Development Networks Sport Note that you can change a cell's background color by: table.rows[j].cells[i].bgColor = "#ffcccc

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

Differentiate between forgiveness and reconciliation

Answered: 1 week ago

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago