Skip to content

Commit 7b772b4

Browse files
committed
Add Loop.html with interactive loop functionality and styled output
1 parent a18a906 commit 7b772b4

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
8+
<style>
9+
ul{
10+
list-style-type: none;
11+
}
12+
li{
13+
border: solid 1px black;
14+
padding: 20px;
15+
margin: 5px;
16+
background-color: lightblue;
17+
border-radius: 100px;
18+
float: left;
19+
}
20+
</style>
21+
22+
23+
<script>
24+
25+
//for (let i = 0; i <= 10; i++) {
26+
// console.log(i);
27+
//}
28+
29+
function clickme(){
30+
for(let i = 0; i <= 100; i++){
31+
32+
33+
document.getElementById("print").innerHTML += "<li>" + i + "</li>";
34+
35+
}
36+
37+
}
38+
39+
40+
41+
</script>
42+
43+
</head>
44+
<body>
45+
46+
<h1>Loop</h1>
47+
<button onclick="clickme()">Click me</button>
48+
<ul id="print">
49+
50+
</ul>
51+
52+
</body>
53+
</html>

0 commit comments

Comments
 (0)