Question: Exercise 0. Copy ct.html to a new file and name it ct Ex.html. Copy ct.is to a new file and name it ct ExO.js. 1)Add

Exercise 0. Copy ct.html to a new file and name it ct Ex.html. Copy ct.is to a new file and name it ct ExO.js.

1)Add your name to the list of authors of this page.

2)Link the JS file to the html file.

3)Launch ct_Ex0.html with your browse. Improve the webpage in such a way that when mouse over the button, the text on the button becomes red. When the mouse left the button, the button text resumes the original color - what color it is? If you read the css file, you can see it is DarkSlateGrey. Using IS to accomplish this.

Don't do in CSS (Hint: consider the onmouseover and onmouseout events, and create two functions in JS to change color accordingly.).

EECS1012: Lab 4 - Computational Thinking

two numbers

one number

another number

© Author(s): SM Tausif

-------------------javacript--------------

/* Webpage HTML document for Lab 4.

For: EECS 1012 23w n, York University, Lassonde School of Engineering (LAS)_*/

// for Ex1 to Ex6, change the name of the following function properly

function twoNumber() {

//precondition: w, h belongs to whole numbers

//postcondition: larger is calculated and outputted, or 'they are equal' if they are equal

var a =document.getElementById("number1").value;

var b =document.getElementById("number2").value;

/* in Ex1 to Ex6A, you need to rename "twoNumber" to make it appropriate

for those problems, you may also need to add

variable that you might have in your formulas above */

/* in Ex6A mappingA() do sth like

var a = ...;

if(a >= 90)

answer = "A+";

else if (a>=80)

answer = "A";

else if ....

*/

document.getElementById("output").innerHTML="larger: " + ;

}

/* in Ex6B for mappingB() ,

function mappingB(){

uncomment and complete this block

var a = ...

switch (true){

case (a>=90):

answer="A+";

break;

case (a>=80):

answer="A";

break;

// you need to add more cases for other letter grades

default:

answer="F";

}

}*/

function changeColorover {

document.getElementById("butn").style.color="red"

}

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!