-
Notifications
You must be signed in to change notification settings - Fork 0
/
script-index.js
50 lines (48 loc) · 1.37 KB
/
script-index.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
46
47
48
49
50
var Color={
toNight: function(){
document.querySelector('body').style.backgroundColor='black'
document.querySelector('body').style.color='white';
var links=document.querySelectorAll('a');
var i=0;
while(i<links.length){
links[i].style.color='yellow';
i=i+1;}
content.style.color='red';
asdf.style.color='red';
asdf1.style.color='red';
asdf2.style.color='red';
asdf3.style.color='red';
asdf4.style.color='red';
asdf5.style.color='red';
asdf6.style.color='red';
asdf0.style.color='red';
},
toDay: function(){
document.querySelector('body').style.backgroundColor='white'
document.querySelector('body').style.color='black';
var links=document.querySelectorAll('a');
var i=0;
while(i<links.length){
links[i].style.color='blue';
i=i+1;}
content.style.color='black';
asdf.style.color='white';
asdf1.style.color='white';
asdf2.style.color='white';
asdf3.style.color='white';
asdf4.style.color='white';
asdf5.style.color='white';
asdf6.style.color='white';
asdf0.style.color='white';
}
}
function timeanddate(){
alert(Date());
}
function sum(left, right){
alert(left + right);
}
function greeting(){
return 'hi';
console.log(2);
}