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.
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;
}