-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay13Iteration.html
More file actions
36 lines (35 loc) · 1.04 KB
/
Day13Iteration.html
File metadata and controls
36 lines (35 loc) · 1.04 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
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
window.jquery || document.write("<script src='jquery-3.1.1.js'><\/script>");
</script>
<script>
$(document).ready(function(){
var result='';
$('li').each(function(index,element){
result+=index+"-"+ $(element).text()+"<br><br>";
});
$("#result1").html(result);
var javaData=[100,200,300,400,500];
var result1='';
$.each(javaData, function(index1,element1){
result1+=index1 +"-"+ element1+ "<br>";
});
$("#result").html(result1);
});
</script>
</head>
<body>
<ul>
<li>India</li>
<li>USA</li>
<li>Australia</li>
<li>UK</li>
</ul>
<div id="result">
</div>
<div id="result1">
</div>
</body>
</html>