-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
61 lines (49 loc) · 2.11 KB
/
script.js
File metadata and controls
61 lines (49 loc) · 2.11 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
function random() {
return Math.floor(Math.random() * 255)
}
function getcolors() {
const r = random();
const g = random();
const b = random();
return `rgb(${r},${g},${b})`
}
const output1 = getcolors();
document.getElementById(`one`).style.backgroundColor = output1;
document.getElementById(`one`).innerHTML = output1;
const output2 = getcolors();
document.getElementById(`two`).style.backgroundColor = output2;
document.getElementById(`two`).innerHTML = output2;
const output3 = getcolors();
document.getElementById(`three`).style.backgroundColor = output3;
document.getElementById(`three`).innerHTML = output3;
const output4 = getcolors();
document.getElementById(`four`).style.backgroundColor = output4;
document.getElementById(`four`).innerHTML = output4;
const output5 = getcolors();
document.getElementById(`five`).style.backgroundColor = output5;
document.getElementById(`five`).innerHTML = output5;
const output6 = getcolors();
document.getElementById(`six`).style.backgroundColor = output6;
document.getElementById(`six`).innerHTML = output6;
const output7 = getcolors();
document.getElementById(`seven`).style.backgroundColor = output7;
document.getElementById(`seven`).innerHTML = output7;
const output8 = getcolors();
document.getElementById(`eight`).style.backgroundColor = output8;
document.getElementById(`eight`).innerHTML = output8;
const output9 = getcolors();
document.getElementById(`nine`).style.backgroundColor = output9;
document.getElementById(`nine`).innerHTML = output9;
const output10 = getcolors();
document.getElementById(`ten`).style.backgroundColor = output10;
document.getElementById(`ten`).innerHTML = output10;
// Heading
const output11 = getcolors();
document.getElementById(`eleven`).style.backgroundColor = output11;
// document.getElementById(`eleven`).innerHTML = output11;
const output12 = getcolors();
document.getElementById(`thirteen`).style.backgroundColor = output12;
document.getElementById(`thirteen`).innerHTML = output12;
const output13 = getcolors();
document.getElementById(`twelve`).style.backgroundColor = output13;
document.getElementById(`twelve`).innerHTML = output13;