-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
39 lines (38 loc) · 895 Bytes
/
script.js
File metadata and controls
39 lines (38 loc) · 895 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
35
36
37
38
39
function newStyle() {
let newColor = '';
let newFont = '';
let x = Math.floor(Math.random()*7);
switch (x){
case 0:
newColor = 'salmon';
newFont = 'Times New Roman';
break;
case 1:
newColor = 'purple';
newFont = 'Florence, cursive';
break;
case 2:
newColor = 'yellow';
newFont = 'Verdana';
break;
case 3:
newColor= 'blue';
newFont = 'Courier New';
break
case 4:
newColor = 'red';
newFont = 'Georgia';
break;
case 5:
newColor = 'pink';
newFont = 'Palatino';
break;
case 6:
newColor = 'lime';
newFont = 'Impact';
break;
}
var elem = document.getElementById('logo');
elem.style.color = newColor;
elem.style.fontFamily = newFont;
}