-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
45 lines (33 loc) · 946 Bytes
/
script.js
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
let colorselect = document.getElementById('main-container');
function red() {
colorselect.style.backgroundColor = 'red';
colorselect.style.color = 'white';
}
function yellow() {
colorselect.style.backgroundColor = 'yellow';
colorselect.style.color = 'black';
}
function blue() {
colorselect.style.backgroundColor = 'blue';
colorselect.style.color = 'white';
}
function green() {
colorselect.style.backgroundColor = 'green';
colorselect.style.color = 'white';
}
function purple() {
colorselect.style.backgroundColor = 'purple';
colorselect.style.color = 'white';
}
function orange() {
colorselect.style.backgroundColor = 'orange';
colorselect.style.color = 'white';
}
function pink() {
colorselect.style.backgroundColor = 'pink';
colorselect.style.color = 'black';
}
function cyan() {
colorselect.style.backgroundColor = 'cyan';
colorselect.style.color = 'black';
}