Skip to content

Commit 90a4cbe

Browse files
authored
Merge pull request Pankaj-Str#1 from codeswithpankaj/main
update loop box
2 parents 9d4957b + 2023ec8 commit 90a4cbe

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

Example/Loop/index.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
10+
li{
11+
list-style: none;
12+
border: solid 1px black;
13+
height: 25px;
14+
width: 25px;
15+
border-radius: 100px;
16+
text-align: center;
17+
float: left;
18+
padding: 25px;
19+
margin: 5px;
20+
background-color: aqua;
21+
}
22+
23+
</style>
24+
25+
<script>
26+
function box(){
27+
28+
list = document.getElementById("box_no").value;
29+
30+
let print_data = document.getElementById("print");
31+
32+
for(let i = 0; i <= list ; i++){
33+
34+
print_data.innerHTML += "<li>"+i+"</li>"
35+
36+
}
37+
38+
39+
40+
}
41+
</script>
42+
</head>
43+
<body>
44+
45+
<lable>Enter Number : </lable>
46+
<input type="text" id="box_no">
47+
<button onclick="box()">Result</button>
48+
49+
<ul id="print">
50+
51+
</ul>
52+
53+
54+
55+
56+
57+
</body>
58+
</html>

Example/Loop/loop.js

Whitespace-only changes.

0 commit comments

Comments
 (0)