Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

KEY QUESTION Refer to Figure 3.6, page

Answered: 1 week ago