-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswitch.html
More file actions
66 lines (63 loc) · 1.67 KB
/
switch.html
File metadata and controls
66 lines (63 loc) · 1.67 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SwitchJS</title>
</head>
<link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'>
<style>
button{
padding: 20px;
border: 2px solid black;
border-radius: 10px;
}
h1,p{
font-family: 'poppins';
}
ul li,h3{
font-family: 'poppins';
list-style: none;
}
</style>
<script>
var h=0;
function hide(){
if(h==0){
x=document.getElementById("photu")
x.style.visibility = "hidden"
a = document.getElementById("butt")
a.innerHTML = "Visible me"
h=1
}
else{
x=document.getElementById("photu")
x.style.visibility="visible"
a = document.getElementById("butt")
a.innerHTML = "Hide Me"
h=0;
}
stopme = setTimeout(hide,1000)
}
function stop(){
clearTimeout(stopme)
}
</script>
<body>
<center>
<h1>SwitchJS</h1>
<p>Let's play with a button <br>"Concept of recursion" </p>
<hr><br>
<img src="Dayalbagh_Educational_Institute_logo.jpg" alt="logo" id="photu"><br><br>
<button onclick="hide()" id="butt">Hide me</button>
<button onclick="stop()">Stop the loop</button>
<footer><p>© Mudit Web Development </footer>
<ul>
<h3>Welcome to the blinking image practical</h3>
<li>Concept of recursion.</li><br>
<li>Calling function in function itself.</li><br>
<li>js used</li><br>
</ul>
</center>
</body>
</html>