forked from Pankaj-Str/JavaScript-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleOf_Array.html
More file actions
44 lines (31 loc) · 821 Bytes
/
ExampleOf_Array.html
File metadata and controls
44 lines (31 loc) · 821 Bytes
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
<!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>
.box{
border: solid 1px black;
float: left;
background-color: antiquewhite;
list-style: none;
padding: 20px;
margin: 5px;
}
</style>
<script>
function get_data(){
data = ["java","c++","go","jsp"]
for(a = 0 ; a < data.length ; a++){
document.getElementById("print").innerHTML += '<li class="box">'+data[a]+'</li>';
}
}
</script>
</head>
<body>
<button onclick="get_data()">Print</button>
<ul id="print">
</ul>
</body>
</html>