-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimer3.html
More file actions
51 lines (37 loc) · 1.06 KB
/
timer3.html
File metadata and controls
51 lines (37 loc) · 1.06 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
<!--timer functions-->
<!DOCTYPE html>
<html lang="em">
<head>
<meta charset="UTF-8">
<script>
</script>
</head>
<body>
<h1>changing wallpaper</h1>
<p>ao;slddjfoasjdfjosjgoidfjosasjfosajf asdlfjladsj sslkjdoasjgoss
laskjfoasd sjfkadsjfojsoj sfsdjdll
salkjsgfjlksdjldfgjklsdflkkdflgjlskfldfgjlsdkflkkjglksldfkldfkglksld;fklsagl
</p>
<div>asjdofjasiojflkadsjoifjodfkjfos asldkjfoiasjflsdjfio asddfjasiojfladsmf
asdlkkfjoiadsjfoasdofs asdlflkadsdjfoas masddflasdkf
;sdllkfsjopdfks</div>
<script>
const imgs=['MyLogo.png','bike.jpg','pakhi.jpg'];
let i=0;
setInterval(function(){
document.body.style.backgroundImage=`url(${imgs[i]})`;
document.body.style.backgroundSize="cover";
i++;
if(i==imgs.length)
i=0;
},"3000");
</script>
</body>
</html>
<!--
setTimeout()
setInterval()
callback, timer, it exe task, repeatedly for every n mi.sec
var=widow.setInterval(task,"interval")
clearTimeout()
-->