Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Code help please. This is what I have so far. CAPSTONE SIMULATION addition, you

ID: 3708668 • Letter: C

Question

Code help please.

This is what I have so far.





CAPSTONE SIMULATION addition, you need to create an array of at least five background col Demonstrate that you have mastered the concepts presented in this lesson by creating a new version of the style class viewer you cre ors, and your stylize() function selects one of these at random also. ated in Step-by-Step 10.5. In this new viewer, you must define at Use the knowledge you obtained in Step-by-Step 10.2 to set the least 20 style classes that vary in font family, font size, and font color. Then, you must modify your JavaScript function so that it color of the text phrase. Refer to Figure 10-23 picks one of these style classes at random each time it is called. In table cell's background color, in addition to setting the foreground Hello World Wide Web! Done FIGURE 10-23 Randomizing style class viewer

Explanation / Answer

If you have any doubts, please give me comment...

capstone-10.html

<!DOCTYPE html>

<html>

<head>

<title>HTML and Javascript</title>

<link rel="stylesheet" type="text/css" href="capstone-10.css">

<script type="text/javascript">

function stylize(){

var backgrounds = ["pink", "yellow", "aliceblue", "grey", "skyblue"];

bg_index = Math.floor(Math.random()*backgrounds.length+1);

index = Math.floor(Math.random()*20+1);

var s = "mystyle"+index;

var e = document.getElementById("MessageText");

e.className = s;

e.parentNode.style.background = backgrounds[bg_index];

setTimeout("stylize()", 1500);

return;

}

</script>

</head>

<body>

<table align="center" border="1" bordercolor="black">

<tr>

<td align="center">

<font size="3"><b>STYLE CLASS VIEWER</b></font>

</td>

</tr>

<tr>

<td align="center" height="100" width="400">

<div id="MessageText" class="mystyle1">

Hello wolrd Wide web!

</div>

</td>

</tr>

</table>

</body>

</html>

capstone-10.css

.mystyle1{

color:black;

font-size:12px;

}

.mystyle2{

color:black;

font-size:18px;

}.mystyle3{

color:black;

font-size:24px;

}.mystyle4{

color:black;

font-size:30px;

}.mystyle5{

color:red;

font-size:30px;

}.mystyle6{

color:green;

font-size:30px;

}

.mystyle7{

color:red;

font-size:12px;

}

.mystyle8{

color:red;

font-size:18px;

}

.mystyle9{

color:red;

font-size:24;

}

.mystyle10{

color:blue;

font-size:12;

}

.mystyle11{

color:blue;

font-size:18;

}

.mystyle12{

color:blue;

font-size:24;

}

.mystyle13{

color:green;

font-size:12;

}

.mystyle14{

color:green;

font-size:18;

}

.mystyle15{

color:green;

font-size:24;

}

.mystyle16{

color:orange;

font-size:30;

}

.mystyle18{

color:orange;

font-size:12;

}

.mystyle18{

color:orange;

font-size:18;

}

.mystyle19{

color:orange;

font-size:24;

}

.mystyle20{

color:orange;

font-size:36;

}