-
Notifications
You must be signed in to change notification settings - Fork 0
/
iterative.html
77 lines (65 loc) · 1.73 KB
/
iterative.html
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
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<title>Iterative</title>
<style>
.main-container {
height: 500px;
width: 50%;
background-color: grey;
margin-left: 25%;
display: flex;
flex-direction: column;
}
.display {
height: 200px;
width: 100%;
background-color: bisque;
border-radius: 10px;
text-align: center;
font-size: 20px;
}
button {
height: 50px;
width: 80%;
background-color: greenyellow;
margin: 5px;
}
input {
height: 50px;
width: 80%;
background-color: yellow;
}
.center {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 10px;
}
</style>
<script>
let output= 0;
function moveText() {
output = document.getElementById("display").value = "hello";
while(x>0){
document.getElementById("display").innerHTML = "hello";
x= x-1;
}
}
function clearText(){
document.getElementById("display").innerHTML = "";
}
</script>
</head>
<body>
<div class="main-container">
<div class="display" id="display"></div>
<div class="center">
<input class="button" type="number" id="input" value="" />
<button class="button" id="text-display" onmouseenter="moveText()" onmouseleave="clearText()">Click
here</button>
</div>
</div>
</body>
</html>