-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathArray01.html
More file actions
48 lines (42 loc) · 1.15 KB
/
Array01.html
File metadata and controls
48 lines (42 loc) · 1.15 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
li{
height: auto;
width: auto;
border: solid 1px black;
float: left;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 15px;
padding-right: 15px;
background-color: bisque;
border-radius: 20px;
margin: 10px;
}
ul{
list-style: none;
}
</style>
<script>
function get_data(){
data = ['java','c++','python','reactjs','jsp']
// console.log(data)
// console.log(data[1])
print_d = document.getElementById("print_data");
for (let index = 0; index < data.length; index++) {
print_d.innerHTML += "<li>"+data[index]+"</li>";
}
}
</script>
</head>
<body>
<button onclick="get_data()">Get Data</button>
<ul id="print_data">
</ul>
</body>
</html>