-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
37 lines (29 loc) · 769 Bytes
/
Copy pathscript.js
File metadata and controls
37 lines (29 loc) · 769 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
let textOne = document.getElementById('textOne');
function DisplayOne() {
textOne.innerHTML = "OOPs!";
}
let textTwo = document.getElementById('textTwo');
function DisplayTwo() {
textTwo.innerHTML = new Date();
}
let textThree = document.getElementById('textThree');
function DisplayThree() {
var text = "";
if (navigator.cookieEnabled == true) {
text = "Cookies are enabled.";
} else {
text = "Cookies are not enabled.";
}
textThree.innerHTML = text;
}
let hover = document.getElementById('hover');
function DisplayFour() {
let x = true;
if (x == true) {
hover.style.backgroundColor = '#00FF00';
x = false;
} else {
hover.style.backgroundColor = 'white';
x = true;
}
}