-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
34 lines (34 loc) · 884 Bytes
/
Copy pathindex.html
File metadata and controls
34 lines (34 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html>
<head>
<script>
var color = 0;
function startTime() {
if (color == 0) {
document.body.style.backgroundColor = "red";
}
if (color == 1) {
document.body.style.backgroundColor = "green";
}
if (color == 2) {
document.body.style.backgroundColor = "blue";
}
if (color == 3) {
document.body.style.backgroundColor = "white";
}
color++;
if (color > 2) color = 0;
var t = setTimeout(startTime, 1000);
}
</script>
</head>
<body onload="startTime()">
<table style="width: 100%; height: 20%">
<tr>
<td style="background-color: red; color: red;">rojo</td>
<td style="background-color: green; color: green;">verde</td>
<td style="background-color: blue; color: blue;">azul</td>
</tr>
</table>
</body>
</html>